-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
What is a block? #2452
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
Hey, thanks for creating an issue!
|
The bug is a duplicate of #872, the documentation need to be done though. if hasattr(SafeConfigParser, "read_file"):
return SafeConfigParser.read_file(self, fp, filename)
else: # pylint: disable=deprecated-method
return SafeConfigParser.readfp(self, fp, filename) Would work here. |
Question
Apologies if this has been asked before, but I'm curious what pylint considers a "block" and whether that could be documented more explicitly. Right now, the docs state:
I ask this because I was surprised to see that the following does not work:
The
deprecated-method
warning is still raised.However, the following does work:
The
deprecated-method
warning is disabled, as desired. In theif/else
case, I had to add the# pylint: disable=
line to block that contains theif/else
instead.The text was updated successfully, but these errors were encountered: