saiunit.typing.quantity_type#
- saiunit.typing.quantity_type(item)[source]#
Return a runtime-checkable Quantity type for
isinstance.Some static analyzers flag
isinstance(x, Quantity["length"])as a parameterized-generic class check.quantity_type(...)provides the same runtime behavior without that warning pattern.- Return type:
type[saiunit.Quantity]