Error codes for optional checks
This section documents various errors codes that mypy generates onlyif you enable certain options. See Error codes for generaldocumentation about error codes. Error codes enabled by default documentserror codes that are enabled by default.
Note
The examples in this section use inline configuration to specify mypy options. You can also set the sameoptions by using a configuration file orcommand-line options.
- Check that type arguments exist [type-arg]
- Check that every function has an annotation [no-untyped-def]
- Check that cast is not redundant [redundant-cast]
- Check that comparisons are overlapping [comparison-overlap]
- Check that no untyped functions are called [no-untyped-call]
- Check that function does not return Any value [no-any-return]
- Check that types have no Any components due to missing imports [no-any-unimported]
- Check that statement or expression is unreachable [unreachable]