module documentation

Message constants for generating error messages during type checking. Literal messages should be defined as constants in this module so they won't get out of sync if used in more than one place, and so that they can be easily introspected. These messages are ultimately consumed by messages.MessageBuilder.fail(). For more non-trivial message generation, add a method to MessageBuilder and call this instead.

Class ErrorMessage Undocumented
Constant ALL_MUST_BE_SEQ_STR Undocumented
Constant ARGUMENT_TYPE_EXPECTED Undocumented
Constant ASYNC_FOR_OUTSIDE_COROUTINE Undocumented
Constant ASYNC_WITH_OUTSIDE_COROUTINE Undocumented
Constant BAD_CONSTRUCTOR_TYPE Undocumented
Constant BARE_GENERIC Undocumented
Constant CANNOT_ACCESS_FINAL_INSTANCE_ATTR Undocumented
Constant CANNOT_ACCESS_INIT Undocumented
Constant CANNOT_ASSIGN_TO_METHOD Undocumented
Constant CANNOT_ASSIGN_TO_TYPE Undocumented
Constant CANNOT_INFER_LAMBDA_TYPE Undocumented
Constant CANNOT_INHERIT_FROM_FINAL Undocumented
Constant CANNOT_INSTANTIATE_PROTOCOL Undocumented
Constant CANNOT_MAKE_DELETABLE_FINAL Undocumented
Constant CANNOT_MODIFY_MATCH_ARGS Undocumented
Constant CANNOT_OVERRIDE_CLASS_VAR Undocumented
Constant CANNOT_OVERRIDE_INSTANCE_VAR Undocumented
Constant CANNOT_USE_TYPEVAR_AS_EXPRESSION Undocumented
Constant CLASS_PATTERN_DUPLICATE_KEYWORD_PATTERN Undocumented
Constant CLASS_PATTERN_GENERIC_TYPE_ALIAS Undocumented
Constant CLASS_PATTERN_KEYWORD_MATCHES_POSITIONAL Undocumented
Constant CLASS_PATTERN_TOO_MANY_POSITIONAL_ARGS Undocumented
Constant CLASS_PATTERN_TYPE_REQUIRED Undocumented
Constant CLASS_PATTERN_UNKNOWN_KEYWORD Undocumented
Constant CLASS_VAR_CONFLICTS_SLOTS Undocumented
Constant CLASS_VAR_OUTSIDE_OF_CLASS Undocumented
Constant CLASS_VAR_WITH_GENERIC_SELF Undocumented
Constant CLASS_VAR_WITH_TYPEVARS Undocumented
Constant CONTIGUOUS_ITERABLE_EXPECTED Undocumented
Constant DATACLASS_FIELD_ALIAS_MUST_BE_LITERAL Undocumented
Constant DEPENDENT_FINAL_IN_CLASS_BODY Undocumented
Constant DESCRIPTOR_GET_NOT_CALLABLE Undocumented
Constant DESCRIPTOR_SET_NOT_CALLABLE Undocumented
Constant DUPLICATE_TYPE_SIGNATURES Undocumented
Constant EMPTY_BODY_ABSTRACT Undocumented
Constant ENUM_MEMBERS_ATTR_WILL_BE_OVERRIDEN Undocumented
Constant ERASED_SELF_TYPE_NOT_SUPERTYPE Undocumented
Constant FORMAT_REQUIRES_MAPPING Undocumented
Constant FUNCTION_ALWAYS_TRUE Undocumented
Constant FUNCTION_PARAMETER_CANNOT_BE_COVARIANT Undocumented
Constant FUNCTION_TYPE_EXPECTED Undocumented
Constant GENERIC_CLASS_VAR_ACCESS Undocumented
Constant GENERIC_INSTANCE_VAR_CLASS_ACCESS Undocumented
Constant IMPLICIT_GENERIC_ANY_BUILTIN Undocumented
Constant INCOMPATIBLE_IMPORT_OF Undocumented
Constant INCOMPATIBLE_REDEFINITION Undocumented
Constant INCOMPATIBLE_RETURN_VALUE_TYPE Undocumented
Constant INCOMPATIBLE_TYPES Undocumented
Constant INCOMPATIBLE_TYPES_IN_ASSIGNMENT Undocumented
Constant INCOMPATIBLE_TYPES_IN_ASYNC_FOR Undocumented
Constant INCOMPATIBLE_TYPES_IN_ASYNC_WITH_AENTER Undocumented
Constant INCOMPATIBLE_TYPES_IN_ASYNC_WITH_AEXIT Undocumented
Constant INCOMPATIBLE_TYPES_IN_AWAIT Undocumented
Constant INCOMPATIBLE_TYPES_IN_CAPTURE Undocumented
Constant INCOMPATIBLE_TYPES_IN_STR_INTERPOLATION Undocumented
Constant INCOMPATIBLE_TYPES_IN_YIELD Undocumented
Constant INCOMPATIBLE_TYPES_IN_YIELD_FROM Undocumented
Constant INCOMPATIBLE_TYPEVAR_VALUE Undocumented
Constant INCONSISTENT_ABSTRACT_OVERLOAD Undocumented
Constant INVALID_EXCEPTION Undocumented
Constant INVALID_EXCEPTION_GROUP Undocumented
Constant INVALID_EXCEPTION_TYPE Undocumented
Constant INVALID_IMPLICIT_RETURN Undocumented
Constant INVALID_NEW_TYPE Undocumented
Constant INVALID_RETURN_TYPE_FOR_ASYNC_GENERATOR Undocumented
Constant INVALID_RETURN_TYPE_FOR_GENERATOR Undocumented
Constant INVALID_SLICE_INDEX Undocumented
Constant INVALID_TYPE_FOR_SLOTS Undocumented
Constant INVALID_TYPE_RAW_ENUM_VALUE Undocumented
Constant INVALID_TYPEDDICT_ARGS Undocumented
Constant INVALID_TYPEVAR_ARG_BOUND Undocumented
Constant INVALID_TYPEVAR_ARG_VALUE Undocumented
Constant INVALID_TYPEVAR_AS_TYPEARG Undocumented
Constant INVALID_UNPACK Undocumented
Constant ITERABLE_ALWAYS_TRUE Undocumented
Constant ITERABLE_TYPE_EXPECTED Undocumented
Constant KEYWORD_ARGUMENT_REQUIRES_STR_KEY_TYPE Undocumented
Constant MALFORMED_ASSERT Undocumented
Constant MISSING_MATCH_ARGS Undocumented
Constant MISSING_OR_INVALID_SELF_TYPE Undocumented
Constant MISSING_RETURN_STATEMENT Undocumented
Constant MODULE_LEVEL_GETATTRIBUTE Undocumented
Constant MULTIPLE_ASSIGNMENTS_IN_PATTERN Undocumented
Constant MULTIPLE_OVERLOADS_REQUIRED Undocumented
Constant MUST_HAVE_NONE_RETURN_TYPE Undocumented
Constant NAME_NOT_IN_SLOTS Undocumented
Constant NO_RETURN_EXPECTED Undocumented
Constant NO_RETURN_VALUE_EXPECTED Undocumented
Constant NON_INSTANCE_NEW_TYPE Undocumented
Constant NOT_CALLABLE Undocumented
Constant ONLY_CLASS_APPLICATION Undocumented
Constant OR_PATTERN_ALTERNATIVE_NAMES Undocumented
Constant READ_ONLY_PROPERTY_OVERRIDES_READ_WRITE Undocumented
Constant RETURN_IN_ASYNC_GENERATOR Undocumented
Constant RETURN_TYPE_CANNOT_BE_CONTRAVARIANT Undocumented
Constant RETURN_TYPE_EXPECTED Undocumented
Constant RETURN_VALUE_EXPECTED Undocumented
Constant RUNTIME_PROTOCOL_EXPECTED Undocumented
Constant SUPER_ARG_2_NOT_INSTANCE_OF_ARG_1 Undocumented
Constant SUPER_ENCLOSING_POSITIONAL_ARGS_REQUIRED Undocumented
Constant SUPER_OUTSIDE_OF_METHOD_NOT_SUPPORTED Undocumented
Constant SUPER_POSITIONAL_ARGS_REQUIRED Undocumented
Constant SUPER_VARARGS_NOT_SUPPORTED Undocumented
Constant SUPER_WITH_SINGLE_ARG_NOT_SUPPORTED Undocumented
Constant TARGET_CLASS_HAS_NO_BASE_CLASS Undocumented
Constant TOO_MANY_ARGS_FOR_SUPER Undocumented
Constant TOO_MANY_UNION_COMBINATIONS Undocumented
Constant TUPLE_INDEX_OUT_OF_RANGE Undocumented
Constant TYPE_ALWAYS_TRUE Undocumented
Constant TYPE_ALWAYS_TRUE_UNIONTYPE Undocumented
Constant TYPE_GUARD_POS_ARG_REQUIRED Undocumented
Constant TYPE_MUST_BE_USED Undocumented
Constant TYPEDDICT_KEY_MUST_BE_STRING_LITERAL Undocumented
Constant TYPEVAR_BOUND_MUST_BE_TYPE Undocumented
Constant TYPEVAR_UNEXPECTED_ARGUMENT Undocumented
Constant TYPEVAR_VARIANCE_DEF Undocumented
Constant UNBOUND_TYPEVAR Undocumented
Constant UNSUPPORTED_ARG_1_FOR_SUPER Undocumented
Constant UNSUPPORTED_ARG_2_FOR_SUPER Undocumented
Constant YIELD_VALUE_EXPECTED Undocumented
ALL_MUST_BE_SEQ_STR = (source)

Undocumented

Value
ErrorMessage('Type of __all__ must be {}, not {}')
ARGUMENT_TYPE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Function is missing a type annotation for one or more arguments', codes.NO_UNTYPED_DEF
)
ASYNC_FOR_OUTSIDE_COROUTINE: str = (source)

Undocumented

Value
'"async for" outside async function'
ASYNC_WITH_OUTSIDE_COROUTINE: str = (source)

Undocumented

Value
'"async with" outside async function'
BAD_CONSTRUCTOR_TYPE = (source)

Undocumented

Value
ErrorMessage('Unsupported decorated constructor type')
BARE_GENERIC: str = (source)

Undocumented

Value
'Missing type parameters for generic type {}'
CANNOT_ACCESS_FINAL_INSTANCE_ATTR: str = (source)

Undocumented

Value
'Cannot access final instance attribute "{}" on class object'
CANNOT_ACCESS_INIT: str = (source)

Undocumented

Value
'Accessing "__init__" on an instance is unsound, since instance.__init__ could b
e from an incompatible subclass'
CANNOT_ASSIGN_TO_METHOD: str = (source)

Undocumented

Value
'Cannot assign to a method'
CANNOT_ASSIGN_TO_TYPE: str = (source)

Undocumented

Value
'Cannot assign to a type'
CANNOT_INFER_LAMBDA_TYPE = (source)

Undocumented

Value
ErrorMessage('Cannot infer type of lambda')
CANNOT_INHERIT_FROM_FINAL = (source)

Undocumented

Value
ErrorMessage('Cannot inherit from final class "{}"')
CANNOT_INSTANTIATE_PROTOCOL = (source)

Undocumented

Value
ErrorMessage('Cannot instantiate protocol class "{}"')
CANNOT_MAKE_DELETABLE_FINAL = (source)

Undocumented

Value
ErrorMessage('Deletable attribute cannot be final')
CANNOT_MODIFY_MATCH_ARGS: str = (source)

Undocumented

Value
'Cannot assign to "__match_args__"'
CANNOT_OVERRIDE_CLASS_VAR = (source)

Undocumented

Value
ErrorMessage('Cannot override class variable (previously declared on base class 
"{}") with instance variable')
CANNOT_OVERRIDE_INSTANCE_VAR = (source)

Undocumented

Value
ErrorMessage('Cannot override instance variable (previously declared on base cla
ss "{}") with class variable')
CANNOT_USE_TYPEVAR_AS_EXPRESSION: str = (source)

Undocumented

Value
'Type variable "{}.{}" cannot be used as an expression'
CLASS_PATTERN_DUPLICATE_KEYWORD_PATTERN: str = (source)

Undocumented

Value
'Duplicate keyword pattern "{}"'
CLASS_PATTERN_GENERIC_TYPE_ALIAS: str = (source)

Undocumented

Value
'Class pattern class must not be a type alias with type parameters'
CLASS_PATTERN_KEYWORD_MATCHES_POSITIONAL: str = (source)

Undocumented

Value
'Keyword "{}" already matches a positional pattern'
CLASS_PATTERN_TOO_MANY_POSITIONAL_ARGS: str = (source)

Undocumented

Value
'Too many positional patterns for class pattern'
CLASS_PATTERN_TYPE_REQUIRED: str = (source)

Undocumented

Value
'Expected type in class pattern; found "{}"'
CLASS_PATTERN_UNKNOWN_KEYWORD: str = (source)

Undocumented

Value
'Class "{}" has no attribute "{}"'
CLASS_VAR_CONFLICTS_SLOTS: str = (source)

Undocumented

Value
'"{}" in __slots__ conflicts with class variable access'
CLASS_VAR_OUTSIDE_OF_CLASS: str = (source)

Undocumented

Value
'ClassVar can only be used for assignments in class body'
CLASS_VAR_WITH_GENERIC_SELF: str = (source)

Undocumented

Value
'ClassVar cannot contain Self type in generic classes'
CLASS_VAR_WITH_TYPEVARS: str = (source)

Undocumented

Value
'ClassVar cannot contain type variables'
CONTIGUOUS_ITERABLE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Contiguous iterable with same type expected')
DATACLASS_FIELD_ALIAS_MUST_BE_LITERAL: str = (source)

Undocumented

Value
'"alias" argument to dataclass field must be a string literal'
DEPENDENT_FINAL_IN_CLASS_BODY = (source)

Undocumented

Value
ErrorMessage('Final name declared in class body cannot depend on type variables'
)
DESCRIPTOR_GET_NOT_CALLABLE: str = (source)

Undocumented

Value
'{}.__get__ is not callable'
DESCRIPTOR_SET_NOT_CALLABLE = (source)

Undocumented

Value
ErrorMessage('{}.__set__ is not callable')
DUPLICATE_TYPE_SIGNATURES: str = (source)

Undocumented

Value
'Function has duplicate type signatures'
EMPTY_BODY_ABSTRACT = (source)

Undocumented

Value
ErrorMessage('If the method is meant to be abstract, use @abc.abstractmethod', codes.EMPTY_BODY
)
ENUM_MEMBERS_ATTR_WILL_BE_OVERRIDEN = (source)

Undocumented

Value
ErrorMessage('Assigned "__members__" will be overridden by "Enum" internally')
ERASED_SELF_TYPE_NOT_SUPERTYPE = (source)

Undocumented

Value
ErrorMessage('The erased type of self "{}" is not a supertype of its class "{}"'
)
FORMAT_REQUIRES_MAPPING: str = (source)

Undocumented

Value
'Format requires a mapping'
FUNCTION_ALWAYS_TRUE = (source)

Undocumented

Value
ErrorMessage('Function {} could always be true in boolean context',
             code=codes.TRUTHY_FUNCTION)
FUNCTION_PARAMETER_CANNOT_BE_COVARIANT = (source)

Undocumented

Value
ErrorMessage('Cannot use a covariant type variable as a parameter')
FUNCTION_TYPE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Function is missing a type annotation', codes.NO_UNTYPED_DEF)
GENERIC_CLASS_VAR_ACCESS: str = (source)

Undocumented

Value
'Access to generic class variables is ambiguous'
GENERIC_INSTANCE_VAR_CLASS_ACCESS: str = (source)

Undocumented

Value
'Access to generic instance variables via class is ambiguous'
IMPLICIT_GENERIC_ANY_BUILTIN: str = (source)

Undocumented

Value
'Implicit generic "Any". Use "{}" and specify generic parameters'
INCOMPATIBLE_IMPORT_OF = (source)

Undocumented

Value
ErrorMessage('Incompatible import of "{}"',
             code=codes.ASSIGNMENT)
INCOMPATIBLE_REDEFINITION = (source)

Undocumented

Value
ErrorMessage('Incompatible redefinition')
INCOMPATIBLE_RETURN_VALUE_TYPE = (source)

Undocumented

Value
ErrorMessage('Incompatible return value type', codes.RETURN_VALUE)
INCOMPATIBLE_TYPES = (source)

Undocumented

Value
ErrorMessage('Incompatible types')
INCOMPATIBLE_TYPES_IN_ASSIGNMENT = (source)

Undocumented

Value
ErrorMessage('Incompatible types in assignment',
             code=codes.ASSIGNMENT)
INCOMPATIBLE_TYPES_IN_ASYNC_FOR: str = (source)

Undocumented

Value
'Incompatible types in "async for"'
INCOMPATIBLE_TYPES_IN_ASYNC_WITH_AENTER: str = (source)

Undocumented

Value
'Incompatible types in "async with" for "__aenter__"'
INCOMPATIBLE_TYPES_IN_ASYNC_WITH_AEXIT: str = (source)

Undocumented

Value
'Incompatible types in "async with" for "__aexit__"'
INCOMPATIBLE_TYPES_IN_AWAIT = (source)

Undocumented

Value
ErrorMessage('Incompatible types in "await"')
INCOMPATIBLE_TYPES_IN_CAPTURE = (source)

Undocumented

Value
ErrorMessage('Incompatible types in capture pattern')
INCOMPATIBLE_TYPES_IN_STR_INTERPOLATION: str = (source)

Undocumented

Value
'Incompatible types in string interpolation'
INCOMPATIBLE_TYPES_IN_YIELD = (source)

Undocumented

Value
ErrorMessage('Incompatible types in "yield"')
INCOMPATIBLE_TYPES_IN_YIELD_FROM = (source)

Undocumented

Value
ErrorMessage('Incompatible types in "yield from"')
INCOMPATIBLE_TYPEVAR_VALUE: str = (source)

Undocumented

Value
'Value of type variable "{}" of {} cannot be {}'
INCONSISTENT_ABSTRACT_OVERLOAD = (source)

Undocumented

Value
ErrorMessage('Overloaded method has both abstract and non-abstract variants')
INVALID_EXCEPTION = (source)

Undocumented

Value
ErrorMessage('Exception must be derived from BaseException')
INVALID_EXCEPTION_GROUP = (source)

Undocumented

Value
ErrorMessage('Exception type in except* cannot derive from BaseExceptionGroup')
INVALID_EXCEPTION_TYPE = (source)

Undocumented

Value
ErrorMessage('Exception type must be derived from BaseException')
INVALID_IMPLICIT_RETURN = (source)

Undocumented

Value
ErrorMessage('Implicit return in function which does not return')
INVALID_NEW_TYPE = (source)

Undocumented

Value
ErrorMessage('Incompatible return type for "__new__"')
INVALID_RETURN_TYPE_FOR_ASYNC_GENERATOR = (source)

Undocumented

Value
ErrorMessage('The return type of an async generator function should be "AsyncGen
erator" or one of its supertypes')
INVALID_RETURN_TYPE_FOR_GENERATOR = (source)

Undocumented

Value
ErrorMessage('The return type of a generator function should be "Generator" or o
ne of its supertypes')
INVALID_SLICE_INDEX = (source)

Undocumented

Value
ErrorMessage('Slice index must be an integer or None')
INVALID_TYPE_FOR_SLOTS: str = (source)

Undocumented

Value
'Invalid type for "__slots__"'
INVALID_TYPE_RAW_ENUM_VALUE = (source)

Undocumented

Value
ErrorMessage('Invalid type: try using Literal[{}.{}] instead?', codes.VALID_TYPE
)
INVALID_TYPEDDICT_ARGS = (source)

Undocumented

Value
ErrorMessage('Expected keyword arguments, {...}, or dict(...) in TypedDict const
ructor')
INVALID_TYPEVAR_ARG_BOUND: str = (source)

Undocumented

Value
'Type argument {} of "{}" must be a subtype of {}'
INVALID_TYPEVAR_ARG_VALUE: str = (source)

Undocumented

Value
'Invalid type argument value for "{}"'
INVALID_TYPEVAR_AS_TYPEARG: str = (source)

Undocumented

Value
'Type variable "{}" not valid as type argument value for "{}"'
INVALID_UNPACK: str = (source)

Undocumented

Value
'{} cannot be unpacked (must be tuple or TypeVarTuple)'
ITERABLE_ALWAYS_TRUE = (source)

Undocumented

Value
ErrorMessage('{} which can always be true in boolean context. Consider using {} 
instead.',
             code=codes.TRUTHY_ITERABLE)
ITERABLE_TYPE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Invalid type \'{}\' for *expr (iterable expected)')
KEYWORD_ARGUMENT_REQUIRES_STR_KEY_TYPE = (source)

Undocumented

Value
ErrorMessage('Keyword argument only valid with "str" key type in call to "dict"'
)
MALFORMED_ASSERT = (source)

Undocumented

Value
ErrorMessage('Assertion is always true, perhaps remove parentheses?')
MISSING_MATCH_ARGS: str = (source)

Undocumented

Value
'Class "{}" doesn\'t define "__match_args__"'
MISSING_OR_INVALID_SELF_TYPE = (source)

Undocumented

Value
ErrorMessage('Self argument missing for a non-static method (or an invalid type 
for self)')
MISSING_RETURN_STATEMENT = (source)

Undocumented

Value
ErrorMessage('Missing return statement', codes.RETURN)
MODULE_LEVEL_GETATTRIBUTE = (source)

Undocumented

Value
ErrorMessage('__getattribute__ is not valid at the module level')
MULTIPLE_ASSIGNMENTS_IN_PATTERN: str = (source)

Undocumented

Value
'Multiple assignments to name "{}" in pattern'
MULTIPLE_OVERLOADS_REQUIRED = (source)

Undocumented

Value
ErrorMessage('Single overload definition, multiple required')
MUST_HAVE_NONE_RETURN_TYPE = (source)

Undocumented

Value
ErrorMessage('The return type of "{}" must be None')
NAME_NOT_IN_SLOTS = (source)

Undocumented

Value
ErrorMessage('Trying to assign name "{}" that is not in "__slots__" of type "{}"'
)
NO_RETURN_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Return statement in function which does not return')
NO_RETURN_VALUE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('No return value expected', codes.RETURN_VALUE)
NON_INSTANCE_NEW_TYPE = (source)

Undocumented

Value
ErrorMessage('"__new__" must return a class instance (got {})')
NOT_CALLABLE: str = (source)

Undocumented

Value
'{} not callable'
ONLY_CLASS_APPLICATION = (source)

Undocumented

Value
ErrorMessage('Type application is only supported for generic classes')
OR_PATTERN_ALTERNATIVE_NAMES: str = (source)

Undocumented

Value
'Alternative patterns bind different names'
READ_ONLY_PROPERTY_OVERRIDES_READ_WRITE = (source)

Undocumented

Value
ErrorMessage('Read-only property cannot override read-write property')
RETURN_IN_ASYNC_GENERATOR = (source)

Undocumented

Value
ErrorMessage('"return" with value in async generator is not allowed')
RETURN_TYPE_CANNOT_BE_CONTRAVARIANT = (source)

Undocumented

Value
ErrorMessage('Cannot use a contravariant type variable as return type')
RETURN_TYPE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Function is missing a return type annotation', codes.NO_UNTYPED_DEF
)
RETURN_VALUE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Return value expected', codes.RETURN_VALUE)
RUNTIME_PROTOCOL_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Only @runtime_checkable protocols can be used with instance and cl
ass checks')
SUPER_ARG_2_NOT_INSTANCE_OF_ARG_1 = (source)

Undocumented

Value
ErrorMessage('Argument 2 for "super" not an instance of argument 1')
SUPER_ENCLOSING_POSITIONAL_ARGS_REQUIRED = (source)

Undocumented

Value
ErrorMessage('super() requires one or more positional arguments in enclosing fun
ction')
SUPER_OUTSIDE_OF_METHOD_NOT_SUPPORTED = (source)

Undocumented

Value
ErrorMessage('super() outside of a method is not supported')
SUPER_POSITIONAL_ARGS_REQUIRED = (source)

Undocumented

Value
ErrorMessage('"super" only accepts positional arguments')
SUPER_VARARGS_NOT_SUPPORTED = (source)

Undocumented

Value
ErrorMessage('Varargs not supported with "super"')
SUPER_WITH_SINGLE_ARG_NOT_SUPPORTED = (source)

Undocumented

Value
ErrorMessage('"super" with a single argument not supported')
TARGET_CLASS_HAS_NO_BASE_CLASS = (source)

Undocumented

Value
ErrorMessage('Target class has no base class')
TOO_MANY_ARGS_FOR_SUPER = (source)

Undocumented

Value
ErrorMessage('Too many arguments for "super"')
TOO_MANY_UNION_COMBINATIONS = (source)

Undocumented

Value
ErrorMessage('Not all union combinations were tried because there are too many u
nions')
TUPLE_INDEX_OUT_OF_RANGE = (source)

Undocumented

Value
ErrorMessage('Tuple index out of range')
TYPE_ALWAYS_TRUE = (source)

Undocumented

Value
ErrorMessage('{} which does not implement __bool__ or __len__ so it could always
 be true in boolean context',
             code=codes.TRUTHY_BOOL)
TYPE_ALWAYS_TRUE_UNIONTYPE = (source)

Undocumented

Value
ErrorMessage('{} of which no members implement __bool__ or __len__ so it could a
lways be true in boolean context',
             code=codes.TRUTHY_BOOL)
TYPE_GUARD_POS_ARG_REQUIRED = (source)

Undocumented

Value
ErrorMessage('Type guard requires positional argument')
TYPE_MUST_BE_USED: str = (source)

Undocumented

Value
'Value of type {} must be used'
TYPEDDICT_KEY_MUST_BE_STRING_LITERAL = (source)

Undocumented

Value
ErrorMessage('Expected TypedDict key to be string literal')
TYPEVAR_BOUND_MUST_BE_TYPE: str = (source)

Undocumented

Value
'TypeVar "bound" must be a type'
TYPEVAR_UNEXPECTED_ARGUMENT: str = (source)

Undocumented

Value
'Unexpected argument to "TypeVar()"'
TYPEVAR_VARIANCE_DEF: str = (source)

Undocumented

Value
'TypeVar "{}" may only be a literal bool'
UNBOUND_TYPEVAR: str = (source)

Undocumented

Value
'A function returning TypeVar should receive at least one argument containing th
e same TypeVar'
UNSUPPORTED_ARG_1_FOR_SUPER = (source)

Undocumented

Value
ErrorMessage('Unsupported argument 1 for "super"')
UNSUPPORTED_ARG_2_FOR_SUPER = (source)

Undocumented

Value
ErrorMessage('Unsupported argument 2 for "super"')
YIELD_VALUE_EXPECTED = (source)

Undocumented

Value
ErrorMessage('Yield value expected')