-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[waiting for typed_ast PR] allow to write both "type: ignore" and "mypy: ignore" #2030
Conversation
@JukkaL what do you think of the idea? |
This looks reasonable -- I've thought about other mypy-specific directives, and |
@ddfisher Can you comment on the need to also support this ( |
If we are going to eventually migrate to only |
Yes, this will need to be added to typed-ast, and I don't think we On Wednesday, August 17, 2016, Jukka Lehtosalo notifications@github.com
|
Is there an example use-case for this? typed-ast support aside, I feel a bit concerned about the need for this. |
There isn't a strong use case, but it would be convenient to have a mypy-specific "ignore", especially for typeshed. |
Ah. FWIW, you currently cannot prevent mypy from parsing a file with a |
Isn't the whole-file # type: ignore a separate issue from this?
|
It is. What I mean by "prevent mypy from parsing a file" is: |
FWIW if you need to skip a file completely with mypy, the mypy_test.py
script has a -x option. (It was used extensively in the early days, e.g.
for the horribly broken mysql stubs. Now those are merely horribly
incomplete. :-)
|
Hey @matthiaskramm, It looks like this PR is pretty much stuck. I'm trying to clean up stuck PRs so that the list of PRs is not too long. If you feel like working on this some more, just go ahead and reopen it, or open a new PR -- the corresponding issue will remain open with a reference to this (closed) PR in it, so if someone else feels like tackling this problem they still have this PR as a starting point. (In particular, we're waiting for a change in typed-ast first. Once that has landed I expect that adding the new functionality to mypy would require a different PR anyways.) |
if you are here looking for a remedy for PyCharm's going crazy when it sees comments like still, it would be nice to have |
This is useful for adding mypy-specific ignores to typeshed.