-
Notifications
You must be signed in to change notification settings - Fork 908
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
(馃悶) bad unnecessary-dunder-call
report for object.__getattribute__(self
within a __getattribute__
implementation
#9486
Comments
unnecessary-dunder-call
report for object.__getattribute__(self
with a __getattribute__
implementationunnecessary-dunder-call
report for object.__getattribute__(self
within a __getattribute__
implementation
What is going on with that filename lol |
Other example of a false-positive: class A:
def __repr__(self):
return "Prints this text"
a = A()
object.__repr__(a) # PLC2801 Generally, for |
Need to understand how pylint handles this. |
So for one thing, they omit dunder calls within dunder methods. |
It looks like they also skip dunder calls on non-instantiated classes? Which includes |
This is the main cause of Another false positive report (IMO) after upgrading to the latest version is the explicit call of dunder methods in test cases. Imagine a |
Yeah we can easily fix that part. The second part is harder and will require us to greatly limit the scope of the rule. |
(I'll fix the first part now.) |
Ah yes, better use
getattr
built-in function..The text was updated successfully, but these errors were encountered: