-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
PLC2801 triggers for cases that are not necessarily errors #9789
Comments
Huh... reading https://docs.python.org/3/howto/descriptor.html this sounds like a totally incorrect suggestion for how |
Yes, |
Looks like it is similar in Pylint: https://github.com/pylint-dev/pylint/blob/6062c1d8bb16de5d1a9f14f51b265653483ad6dd/pylint/constants.py#L143 |
We also get lots of unecessary hits on this rule. We also use the dunder set in a hacky way to get around immutability somewhere temporarily so it's also on us, but then this rule also hits. |
I believe we're removing |
Why would calling a dunder method ever be an error? |
Just because something is possible it's not a good idea. And you can disable the rule altogether if you like doing it and want to keep doing it in your own codebase... |
Is PLC2801 really supposed to trigger in this case, and suggest using a
get
method that does not exist? I can of course easily silence the rule, but just in case it's overzealous here I'm opening this issue.The text was updated successfully, but these errors were encountered: