Skip to content

Diagnostic levels are kind of a mess #6574

Closed
@msullivan

Description

@msullivan

The current situation is:

  • mypy can emit "notes", "warnings", and "errors"
  • Any diagnostics will result in an error exit code
  • (... except for many config file diagnostics, which don't)
  • Of options that are enabled by flags named --warn-something, we produce all three kinds of diagnostics:
    • --warn-redundant-cast produces a note
    • --warn-return-any produces a warning
    • Most seem to produce errors

We emit very few warnings, so I think the right approach is to just eliminate them (and "bare" notes emitted without an error) and turn them all into errors.

The other approach would be to make warnings able to not cause an error return and to reclassify certain warnings as errors. I don't have a real problem with this other than not wanting to do that reclassification. Doing the first would not prevent us from doing this in the future.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions