-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pylint: disable=all
comment is applied to the whole file
#8725
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
Comments
This seems like expected behaviour. The deprecated-pragma warning is disabled by default: pylint --enable=deprecated-pragma example.py
example.py:11:0: I0022: Pragma "disable=all" is deprecated, use "skip-file" instead (deprecated-pragma) deprecated-pragma previously was known as deprecated-disable-all. |
@mbyrnepr2 I think, that the current behaviour is still broken. Either The fact that it's a synonym (?) for |
Yeah I don't know why |
Ok we have a reason not to do this. Please see this comment regarding a wider design-change around these pragmas. |
Hi Mark. Thanks for digging into the relevant context here. I didn't know about any of this.
I wonder if that's an orthogonal issue. Pierre wants to wait if our idea is to make the deprecation more visible, but that's a big if. What if we just fix the behavior to not be surprising and forget about a deprecation that no one has ever seen?
👍 Reopening to continue the discussion about whether to "undo" the deprecation and fix it. |
Bug description
Consider the following example:
For some reason, the
disable=all
comment disables the warnings for the whole file, instead of only for the current block/current line/next line/etc. Compare this with the exact same file, but withdisable=invalid-name
instead ofdisable=all
.Configuration
None
Command used
Pylint output
Expected output
Pylint version
OS / Environment
Manjaro (Arch Linux)
Additional dependencies
The text was updated successfully, but these errors were encountered: