class documentation
class TypeResolver(BaseTypeResolver):
A class to resolve types.
Some types need to reference forward-declared types to avoid eg. cyclic definitions. The resolver allows to efficiently resolve these types if needs be.
Method | __contains__ |
Undocumented |
Method | __delitem__ |
Undocumented |
Method | __getitem__ |
Undocumented |
Method | __init__ |
Initialize a new instance of this class. |
Method | __len__ |
Undocumented |
Method | __setitem__ |
Undocumented |
Method | resolve |
Resolve a type from its name. |
Instance Variable | _types |
Undocumented |
def __contains__(self, type_name):
Undocumented
Parameters | |
typestr | Undocumented |
Returns | |
bool | Undocumented |
def __getitem__(self, type_name):
Undocumented
Parameters | |
typestr | Undocumented |
Returns | |
Type | Undocumented |
def __setitem__(self, type_name, type):
Undocumented
Parameters | |
typestr | Undocumented |
type:Type | Undocumented |
def resolve(self, type_name):
Resolve a type from its name.
Information
Parameters | |
typestr | Undocumented |
Returns | |
Type | Undocumented |
Raises | |
RuntimeError | if the resolved type is None. |