module documentation
(source)

Classification of possible errors mypy can detect.

These can be used for filtering specific errors.

Class ​Error​Code Undocumented
Constant ABSTRACT Undocumented
Constant ARG​_TYPE Undocumented
Constant ASSIGNMENT Undocumented
Constant ATTR​_DEFINED Undocumented
Constant CALL​_ARG Undocumented
Constant CALL​_OVERLOAD Undocumented
Constant COMPARISON​_OVERLAP Undocumented
Constant DICT​_ITEM Undocumented
Constant EXIT​_RETURN Undocumented
Constant FUNC​_RETURNS​_VALUE Undocumented
Constant HAS​_TYPE Undocumented
Constant IMPORT Undocumented
Constant INDEX Undocumented
Constant LIST​_ITEM Undocumented
Constant MISC Undocumented
Constant NAME​_DEFINED Undocumented
Constant NAME​_MATCH Undocumented
Constant NO​_ANY​_RETURN Undocumented
Constant NO​_ANY​_UNIMPORTED Undocumented
Constant NO​_REDEF Undocumented
Constant NO​_UNTYPED​_CALL Undocumented
Constant NO​_UNTYPED​_DEF Undocumented
Constant OPERATOR Undocumented
Constant OVERRIDE Undocumented
Constant REDUNDANT​_CAST Undocumented
Constant REDUNDANT​_EXPR Undocumented
Constant RETURN Undocumented
Constant RETURN​_VALUE Undocumented
Constant STR​_BYTES​_PY3 Undocumented
Constant STRING​_FORMATTING Undocumented
Constant SYNTAX Undocumented
Constant TRUTHY​_BOOL Undocumented
Constant TYPE​_ARG Undocumented
Constant TYPE​_VAR Undocumented
Constant TYPEDDICT​_ITEM Undocumented
Constant UNION​_ATTR Undocumented
Constant UNREACHABLE Undocumented
Constant VALID​_NEWTYPE Undocumented
Constant VALID​_TYPE Undocumented
Constant VAR​_ANNOTATED Undocumented
Variable all​_error​_codes Undocumented
Variable error​_codes Undocumented
ABSTRACT = (source)

Undocumented

Value
ErrorCode('abstract',
          'Prevent instantiation of classes with abstract attributes',
          'General')
ARG_TYPE = (source)

Undocumented

Value
ErrorCode('arg-type', 'Check argument types in calls', 'General')
ASSIGNMENT = (source)

Undocumented

Value
ErrorCode('assignment',
          'Check that assigned value is compatible with target',
          'General')
ATTR_DEFINED = (source)

Undocumented

Value
ErrorCode('attr-defined', 'Check that attribute exists', 'General')
CALL_ARG: ErrorCode = (source)

Undocumented

Value
ErrorCode('call-arg',
          'Check number, names and kinds of arguments in calls',
          'General')
CALL_OVERLOAD = (source)

Undocumented

Value
ErrorCode('call-overload',
          'Check that an overload variant matches arguments',
          'General')
COMPARISON_OVERLAP = (source)

Undocumented

Value
ErrorCode('comparison-overlap',
          'Check that types in comparisons and \'in\' expressions overlap',
          'General')
DICT_ITEM = (source)

Undocumented

Value
ErrorCode('dict-item',
          'Check dict items in a dict expression {key: value, ...}',
          'General')
EXIT_RETURN = (source)

Undocumented

Value
ErrorCode('exit-return',
          'Warn about too general return type for \'__exit__\'',
          'General')
FUNC_RETURNS_VALUE = (source)

Undocumented

Value
ErrorCode('func-returns-value',
          'Check that called function returns a value in value context',
          'General')
HAS_TYPE = (source)

Undocumented

Value
ErrorCode('has-type', 'Check that type of reference can be determined', 'General'
)
IMPORT = (source)

Undocumented

Value
ErrorCode('import',
          'Require that imported module can be found or has stubs',
          'General')
INDEX = (source)

Undocumented

Value
ErrorCode('index', 'Check indexing operations', 'General')
LIST_ITEM = (source)

Undocumented

Value
ErrorCode('list-item',
          'Check list items in a list expression [item, ...]',
          'General')
MISC = (source)

Undocumented

Value
ErrorCode('misc', 'Miscellaneous other checks', 'General')
NAME_DEFINED = (source)

Undocumented

Value
ErrorCode('name-defined', 'Check that name is defined', 'General')
NAME_MATCH = (source)

Undocumented

Value
ErrorCode('name-match',
          'Check that type definition has consistent naming',
          'General')
NO_ANY_RETURN = (source)

Undocumented

Value
ErrorCode('no-any-return',
          'Reject returning value with "Any" type if return type is not "Any"',
          'General')
NO_ANY_UNIMPORTED = (source)

Undocumented

Value
ErrorCode('no-any-unimported',
          'Reject "Any" types from unfollowed imports',
          'General')
NO_REDEF = (source)

Undocumented

Value
ErrorCode('no-redef', 'Check that each name is defined once', 'General')
NO_UNTYPED_CALL = (source)

Undocumented

Value
ErrorCode('no-untyped-call',
          'Disallow calling functions without type annotations from annotated fu
nctions',
          'General')
NO_UNTYPED_DEF: ErrorCode = (source)

Undocumented

Value
ErrorCode('no-untyped-def',
          'Check that every function has an annotation',
          'General')
OPERATOR = (source)

Undocumented

Value
ErrorCode('operator', 'Check that operator is valid for operands', 'General')
OVERRIDE = (source)

Undocumented

Value
ErrorCode('override',
          'Check that method override is compatible with base class',
          'General')
REDUNDANT_CAST = (source)

Undocumented

Value
ErrorCode('redundant-cast',
          'Check that cast changes type of expression',
          'General')
REDUNDANT_EXPR = (source)

Undocumented

Value
ErrorCode('redundant-expr', 'Warn about redundant expressions', 'General',
          default_enabled=False)

Undocumented

Value
ErrorCode('return', 'Check that function always returns a value', 'General')
RETURN_VALUE: ErrorCode = (source)

Undocumented

Value
ErrorCode('return-value',
          'Check that return value is compatible with signature',
          'General')
STR_BYTES_PY3 = (source)

Undocumented

Value
ErrorCode('str-bytes-safe',
          'Warn about dangerous coercions related to bytes and string types',
          'General')
STRING_FORMATTING = (source)

Undocumented

Value
ErrorCode('str-format',
          'Check that string formatting/interpolation is type-safe',
          'General')
SYNTAX = (source)

Undocumented

Value
ErrorCode('syntax', 'Report syntax errors', 'General')
TRUTHY_BOOL: ErrorCode = (source)

Undocumented

Value
ErrorCode('truthy-bool',
          'Warn about expressions that could always evaluate to true in boolean 
contexts',
          'General',
          default_enabled=False)
TYPE_ARG = (source)

Undocumented

Value
ErrorCode('type-arg', 'Check that generic type arguments are present', 'General'
)
TYPE_VAR = (source)

Undocumented

Value
ErrorCode('type-var', 'Check that type variable values are valid', 'General')
TYPEDDICT_ITEM = (source)

Undocumented

Value
ErrorCode('typeddict-item', 'Check items when constructing TypedDict', 'General'
)
UNION_ATTR = (source)

Undocumented

Value
ErrorCode('union-attr',
          'Check that attribute exists in each item of a union',
          'General')
UNREACHABLE = (source)

Undocumented

Value
ErrorCode('unreachable',
          'Warn about unreachable statements or expressions',
          'General')
VALID_NEWTYPE = (source)

Undocumented

Value
ErrorCode('valid-newtype', 'Check that argument 2 to NewType is valid', 'General'
)
VALID_TYPE = (source)

Undocumented

Value
ErrorCode('valid-type', 'Check that type (annotation) is valid', 'General')
VAR_ANNOTATED = (source)

Undocumented

Value
ErrorCode('var-annotated',
          'Require variable annotation if type can\'t be inferred',
          'General')
all_error_codes: List[ErrorCode] = (source)

Undocumented

error_codes: Dict[str, ErrorCode] = (source)

Undocumented