MCPcopy
hub / github.com/python/mypy / TypeInfo

Class TypeInfo

mypy/nodes.py:3601–4402  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

3599
3600
3601class TypeInfo(SymbolNode):
3602 """The type structure of a single class.
3603
3604 Each TypeInfo corresponds one-to-one to a ClassDef, which
3605 represents the AST of the class.
3606
3607 In type-theory terms, this is a "type constructor", and if the
3608 class is generic then it will be a type constructor of higher kind.
3609 Where the class is used in an actual type, it's in the form of an
3610 Instance, which amounts to a type application of the tycon to
3611 the appropriate number of arguments.
3612 """
3613
3614 __slots__ = (
3615 "_fullname",
3616 "module_name",
3617 "defn",
3618 "mro",
3619 "_mro_refs",
3620 "bad_mro",
3621 "is_final",
3622 "is_disjoint_base",
3623 "declared_metaclass",
3624 "metaclass_type",
3625 "names",
3626 "is_abstract",
3627 "is_protocol",
3628 "runtime_protocol",
3629 "abstract_attributes",
3630 "deletable_attributes",
3631 "slots",
3632 "assuming",
3633 "assuming_proper",
3634 "inferring",
3635 "is_enum",
3636 "fallback_to_any",
3637 "meta_fallback_to_any",
3638 "type_vars",
3639 "has_param_spec_type",
3640 "bases",
3641 "_promote",
3642 "tuple_type",
3643 "special_alias",
3644 "is_named_tuple",
3645 "typeddict_type",
3646 "is_newtype",
3647 "is_intersection",
3648 "metadata",
3649 "alt_promote",
3650 "has_type_var_tuple_type",
3651 "type_var_tuple_prefix",
3652 "type_var_tuple_suffix",
3653 "self_type",
3654 "dataclass_transform_spec",
3655 "is_type_check_only",
3656 "deprecated",
3657 "type_object_type",
3658 )

Callers 13

make_fake_typeinfoMethod · 0.90
missing_infoFunction · 0.90
make_empty_type_infoMethod · 0.90
basic_new_typeinfoMethod · 0.90
make_type_infoMethod · 0.90
add_info_hookFunction · 0.90
add_info_hookFunction · 0.90
as_manager_hookFunction · 0.90
add_info_hookFunction · 0.90
deserializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…