Skip to content

Diagnostic levels are kind of a mess #6574

Closed

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.

Activity

  1. ilevkivskyi commented on Mar 20, 2019

    @ilevkivskyi
    Member

    #6472 looks related (in the sense it also tries to add some systematics to error reporting).

  2. added a commit that references this issue on Apr 9, 2019
    6a8d68c
  3. added a commit that references this issue on Apr 11, 2019
    579705d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions