annotation_is_class
Test if a given annotation is a class that can be used in isinstance()/issubclass().
def annotation_is_class(
annotation: typing.Any
) - > bool
Test if a given annotation is a class that can be used in isinstance()/issubclass().
Parameters
| Name | Type | Description |
|---|---|---|
| annotation | typing.Any | The type hint or object to evaluate for class compatibility |
Returns
| Type | Description |
|---|---|
bool | True if the annotation is a valid class for type checking, False if it is a generic type hint or other non-class object |