annotations module¶
Utilities for annotations.
flatten_annotations function¶
Flatten annotations of variable arguments.
get_annotations function¶
Get annotations.
has_annotatables function¶
Check if a function has subclasses or instances of Annotatable in its signature.
Annotatable class¶
Class that can be used in annotations.
Subclasses
MetaAnnotatable class¶
Metaclass that can be used in annotations.
Superclasses
builtins.type
Union class¶
Class representing a union of one to multiple annotations.
Superclasses
Inherited members
- DefineMixin.asdict()
- DefineMixin.assert_field_not_missing()
- DefineMixin.get_field()
- DefineMixin.hash
- DefineMixin.hash_key
- DefineMixin.is_field_missing()
- DefineMixin.is_field_optional()
- DefineMixin.is_field_required()
- DefineMixin.merge_over()
- DefineMixin.merge_with()
- DefineMixin.replace()
- DefineMixin.resolve_field()
- Hashable.get_hash()
annotations class variable¶
Annotations.
resolve method¶
Resolve the union.
resolved class variable¶
Whether the instance is resolved.
VarArgs class¶
Class representing annotations for variable positional arguments.
Superclasses
Inherited members
- DefineMixin.asdict()
- DefineMixin.assert_field_not_missing()
- DefineMixin.get_field()
- DefineMixin.hash
- DefineMixin.hash_key
- DefineMixin.is_field_missing()
- DefineMixin.is_field_optional()
- DefineMixin.is_field_required()
- DefineMixin.merge_over()
- DefineMixin.merge_with()
- DefineMixin.replace()
- DefineMixin.resolve()
- DefineMixin.resolve_field()
- Hashable.get_hash()
args class variable¶
Tuple with annotations.
VarKwargs class¶
Class representing annotations for variable keyword arguments.
Superclasses
Inherited members
- DefineMixin.asdict()
- DefineMixin.assert_field_not_missing()
- DefineMixin.get_field()
- DefineMixin.hash
- DefineMixin.hash_key
- DefineMixin.is_field_missing()
- DefineMixin.is_field_optional()
- DefineMixin.is_field_required()
- DefineMixin.merge_over()
- DefineMixin.merge_with()
- DefineMixin.replace()
- DefineMixin.resolve()
- DefineMixin.resolve_field()
- Hashable.get_hash()
kwargs class variable¶
Dict with annotations.