8000 Enable only a few error codes · Issue #7599 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Enable only a few error codes #7599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dpinol opened this issue Oct 2, 2019 · 2 comments
Open

Enable only a few error codes #7599

dpinol opened this issue Oct 2, 2019 · 2 comments

Comments

@dpinol
Copy link
dpinol commented Oct 2, 2019
  • Are you reporting a bug, or opening a feature request?
    Feature request

I think one of the largest problems with static analyzers is dealing with legacy code. Mypy has a nice documentation about it https://mypy.readthedocs.io/en/latest/existing_code.html

However, what I'm missing is a way to only enable a few checks. In this way I can start by only enabling the most critical checks (eg. name-defined).

As an example, in pylint you can configure the list of checks at the config file, or do --disable=all --enable=check1,check2
http://pylint.pycqa.org/en/latest/user_guide/run.html#command-line-options

thank you guys for this awesome project!

@msullivan
Copy link
Collaborator

Something along these lines is under consideration, I think, but we haven't speced it out.

I think it is more likely that we will allow opting out of certain error codes, since the most sensible behavior is to do our full type checking.

As a piece of advice for adopting mypy, though, I think you would have better luck going file-at-at-time than error-code-at-a-time.

@ilevkivskyi
Copy link
Member

People expect something like this to be supported, so I set the priority to normal. (Maybe it can actually be high?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0