Error codes enabled by default
This section documents various errors codes that mypy can generatewith default options. See Error codes for general documentationabout error codes. Error codes for optional checks documents additionalerror codes that you can enable.
- Check that attribute exists [attr-defined]
- Check that attribute exists in each union item [union-attr]
- Check that name is defined [name-defined]
- Check arguments in calls [call-arg]
- Check argument types [arg-type]
- Check calls to overloaded functions [call-overload]
- Check validity of types [valid-type]
- Require annotation if variable type is unclear [var-annotated]
- Check validity of overrides [override]
- Check that function returns a value [return]
- Check that return value is compatible [return-value]
- Check types in assignment statement [assignment]
- Check type variable values [type-var]
- Check uses of various operators [operator]
- Check indexing operations [index]
- Check list items [list-item]
- Check dict items [dict-item]
- Check TypedDict items [typeddict-item]
- Check that type of target is known [has-type]
- Check that import target can be found [import]
- Check that each name is defined once [no-redef]
- Check that called function returns a value [func-returns-value]
- Check instantiation of abstract classes [abstract]
- Check the target of NewType [valid-newtype]
- Check the return type of exit [exit-return]
- Report syntax errors [syntax]
- Miscellaneous checks [misc]