get_subtype

glotaran.model.util.get_subtype(t: type) type[source]

Gets the subscribed type of a generic type.

If the type is scalar, the type itself will be returned. If the type is a mapping, the value type will be returned.

Parameters

t (type) – The origin type.

Returns

The subscribed type.

Return type

type