class UnionType(ProperType): (source)
Class Method | deserialize |
Undocumented |
Static Method | make_union |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | accept |
Undocumented |
Method | has_readable_member |
For a tree of unions of instances, check whether all instances have a given member. |
Method | length |
Undocumented |
Method | relevant_items |
Removes NoneTypes from Unions when strict Optional checking is off. |
Method | serialize |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Instance Variable | can_be_false |
Undocumented |
Instance Variable | can_be_true |
Undocumented |
Instance Variable | is_evaluated |
Undocumented |
Instance Variable | items |
Undocumented |
Instance Variable | uses_pep604_syntax |
Undocumented |
Inherited from Type
(via ProperType
):
Method | __repr__ |
Undocumented |
Method | can_be_false_default |
Undocumented |
Method | can_be_true_default |
Undocumented |
Inherited from Context
(via ProperType
, Type
):
Method | get_column |
Don't use. Use x.column. |
Method | get_line |
Don't use. Use x.line. |
Method | set_line |
If target is a node, pull line (and column) information into this node. If column is specified, this will override any column information coming from a node. |
Instance Variable | column |
Undocumented |
Instance Variable | end_line |
Undocumented |
Instance Variable | line |
Undocumented |
mypy.types.Type.__init__
Undocumented
Parameters | |
items:Sequence[ | Undocumented |
line:int | Undocumented |
column:int | Undocumented |
is_evaluated:bool | Undocumented |
uses_pep604_syntax:bool | Undocumented |
mypy.types.Type.accept
Undocumented
Parameters | |
visitor:TypeVisitor[ | Undocumented |
Returns | |
T | Undocumented |
For a tree of unions of instances, check whether all instances have a given member.
TODO: Deal with attributes of TupleType etc. TODO: This should probably be refactored to go elsewhere.
Parameters | |
name:str | Undocumented |
Returns | |
bool | Undocumented |