-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
invalid-name "propagates" to users on class properties #751
Comments
This seems a duplicate of #689. |
It's definitely related, but I can also repro this with a single file: def main():
cl = Ac()
cl.badName = 'hello'
class Ac(object):
badName = 'hi' # pylint: disable=invalid-name
main() Results in
|
There's a comment here that may shed some light: https://www.logilab.org/ticket/3733 ? |
I can't replicate this with the latest release, but I can replicate another issue, that is affected by this. If the first file has a disable, then this disable would be propagated inadvertently for the other files, which don't contain this disable. This is probably because we use a global messages store for all the files, which leads to a wrong view of the disable / enable pairs. In order to fix it, we'll have to check the files as well. |
I'm going to close as this was fixed at some point, or I can't reproduce anymore. |
For example, given:
The output of pylint then varies depending on which files are being linted, and the order they're linted, e.g.
That's really unexpected behavior. In this case, I would expect no errors since I disabled them in the declaring module.
This doesn't appear to happen when using instance properties (i.e. init + self.badName).
The text was updated successfully, but these errors were encountered: