The type structure of a single class. Each TypeInfo corresponds one-to-one to a ClassDef, which represents the AST of the class. In type-theory terms, this is a "type constructor", and if the class is generic then it will be a type constructor of higher kind. Where the class is used in an actual type, it's in the form of an Instance, which amounts to a type application of the tycon to the appropriate number of arguments.
Class Method | deserialize |
Undocumented |
Method | __bool__ |
Undocumented |
Method | __getitem__ |
Undocumented |
Method | __init__ |
Initialize a TypeInfo. |
Method | __repr__ |
Undocumented |
Method | __str__ |
Return a string representation of the type. |
Method | add |
Undocumented |
Method | calculate |
Undocumented |
Method | direct |
Return a direct base classes. |
Method | dump |
Return a string dump of the contents of the TypeInfo. |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | has |
Return True if type has a base type with the specified name. |
Method | has |
Undocumented |
Method | is |
Is the type generic (i.e. does it have type variables)? |
Method | is |
Undocumented |
Method | serialize |
Undocumented |
Method | update |
Update tuple_type and special_alias as needed. |
Method | update |
Update typeddict_type and special_alias as needed. |
Constant | FLAGS |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Instance Variable | abstract |
Undocumented |
Instance Variable | alt |
Undocumented |
Instance Variable | assuming |
Undocumented |
Instance Variable | assuming |
Undocumented |
Instance Variable | bad |
Undocumented |
Instance Variable | bases |
Undocumented |
Instance Variable | dataclass |
Undocumented |
Instance Variable | declared |
Undocumented |
Instance Variable | defn |
Undocumented |
Instance Variable | deletable |
Undocumented |
Instance Variable | fallback |
Undocumented |
Instance Variable | has |
Undocumented |
Instance Variable | has |
Undocumented |
Instance Variable | inferring |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | meta |
Undocumented |
Instance Variable | metaclass |
Undocumented |
Instance Variable | metadata |
Undocumented |
Instance Variable | module |
Undocumented |
Instance Variable | mro |
Undocumented |
Instance Variable | names |
Undocumented |
Instance Variable | runtime |
Undocumented |
Instance Variable | self |
Undocumented |
Instance Variable | slots |
Undocumented |
Instance Variable | special |
Undocumented |
Instance Variable | tuple |
Undocumented |
Instance Variable | type |
Undocumented |
Instance Variable | type |
Undocumented |
Instance Variable | type |
Undocumented |
Instance Variable | typeddict |
Undocumented |
Property | fullname |
Undocumented |
Property | name |
Short name. |
Property | protocol |
Undocumented |
Instance Variable | _fullname |
Undocumented |
Instance Variable | _mro |
Undocumented |
Instance Variable | _promote |
Undocumented |
Inherited from Node
(via SymbolNode
):
Method | accept |
Undocumented |
Inherited from Context
(via SymbolNode
, Node
):
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 |
mypy.nodes.Node.__str__
Return a string representation of the type. This includes the most important information about the type.
mypy.strconv.StrConv|None
= None, type_str_conv: mypy.types.TypeStrVisitor|None
= None) -> str
:
(source)
¶
Return a string dump of the contents of the TypeInfo.
Return True if type has a base type with the specified name. This can be either via extension or via implementation.
Undocumented
Value |
|