pytools.typing#
Utilities for run-time type inference.
Functions#
Get the most specific common type of the given objects. |
|
Get the most general common subclass of the given classes. |
|
Extended version of typing_inspect.get_generic_bases that covers some special cases for generic instances of generic aliases. |
|
Given a subclass and a generic base class, get the generic instances of the base class, substituting all type arguments along the class hierarchy. |
|
Given an object and a generic base class, get the type arguments of the base class, substituting all type arguments along the class hierarchy. |
|
Check if an object is an instance of a generic instance, i.e., it is a subclass of the generic class, and has compatible type arguments. |
|
Check if a class is a subclass of a generic instance, i.e., it is a subclass of the generic class, and has compatible type arguments. |