You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat -n a.py
1 # pylint: disable=missing-class-docstring, missing-module-docstring
2
3 class Foo(type):
4 pass
5
6
7 class Bar(Foo):
8 def __init__(cls):
9 super().__init__()
$ flake8 --ignore=D100,D101,D107 a.py
a.py:8:19: N805 first argument of a method should be named 'self'
$ pylint a.py
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
The text was updated successfully, but these errors were encountered:
pylint does significantly more to analyze code that isn't strictly available to us. Presuming the exact case you've provided, we might be able to detect this, but if Foo were in another module, it wouldn't actually work. We have some notion of tracking parent classes already so we might be able to catch this but it's also rare enough that I feel people would be better served by adding # noqa: N805 to the line
PEP8: Always use cls for the first argument to class methods.
Note that pylint is correct here:
The text was updated successfully, but these errors were encountered: