
pylint test.pyExecuting the code works, but a false positive error is shown.
E1003: Bad first argument 'B' given to super() (bad-super-call)
Pylint shouldn't show this error.
pylint 2.3.1
astroid 2.2.5
Python 3.7.3 (default, Mar 26 2019, 21:43:19)
[GCC 8.2.1 20181127]
@Bergiu At line 17 you are supposed to pass C to super(), notB. By passingByou basically ask a MRO navigation starting from B instead of C for finding thesomething` method.
But I want it to start at B, so that I get the something method from A.
Can you reopen the issue @PCManticore, or am I getting something wrong?
What is the difference between lines 15 and 17? Why is 15 ok and 17 bad?
the method is called in line 17.
No sorry I mean from the perspective of pylint. If 17 is flagged then 15 should be too. I was trying to do the same thing you were and I couldn't understand why pylint considered this bad code. It works as I intend but I have been having trouble finding why its considered bad practice
Yes
Came across this while making a project which has the same structure as your code and can't understand why it's considered a bad-super-call. Isn't that the use of super?