class documentation
class UnionType(ProperType): (source)
The union type Union[T1, ..., Tn] (at least one type argument).
Class Method | deserialize |
Undocumented |
Static Method | make |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | accept |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | has |
For a tree of unions of instances, check whether all instances have a given member. |
Method | length |
Undocumented |
Method | relevant |
Removes NoneTypes from Unions when strict Optional checking is off. |
Method | serialize |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | items |
Undocumented |
Instance Variable | uses |
Undocumented |
Inherited from Type
(via ProperType
):
Method | __repr__ |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | is |
Undocumented |
Property | can |
Undocumented |
Property | can |
Undocumented |
Instance Variable | _can |
Undocumented |
Instance Variable | _can |
Undocumented |
Inherited from Context
(via ProperType
, Type
):
Method | set |
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 |
Undocumented |
Instance Variable | end |
Undocumented |
Instance Variable | line |
Undocumented |
def __init__(self, items:
Sequence[ Type]
, line: int
= -1, column: int
= -1, is_evaluated: bool
= True, uses_pep604_syntax: bool
= False):
(source)
¶
overrides
mypy.types.Type.__init__
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.