init_subclass_get_generic_args
Module Contents
Functions
|
Get the generic arguments from a class within the __init_subclass__ function. |
Attributes
- TChild
- TParent
- init_subclass_get_generic_args(child: Type[TChild], parent: Type[TParent]) tuple[Any, Ellipsis]
Get the generic arguments from a class within the __init_subclass__ function.
- Parameters:
child – The type passed to the __init_subclass__ function.
parent – The type of the parent class, which is the class __init_subclass__ is implemented for.
- Returns:
The types. Keep in mind these can be ForwardRef.