-
Notifications
You must be signed in to change notification settings - Fork 185
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
Should be cls in metaclass #164
Comments
We implement PEP 8's naming guidance. In particular https://www.python.org/dev/peps/pep-0008/#function-and-method-arguments I'm not convinced |
Hmm, it doesn't mention metaclasses at all. It looks like in cpython the most common use is But, there are also cases of |
It doesn't explicitly mention it, no, but it does mention implicitly class methods (which I think |
This produces:
./tests/unit/test_auth.py:33:18: N804 first argument of a classmethod should be named 'cls'
But, it's a metaclass, and seems to directly contradict B902 from bugbear:
./tests/unit/test_auth.py:33:17: B902 Invalid first argument 'cls' used for metaclass class method. Use the canonical first argument name in methods, i.e. metacls.
The text was updated successfully, but these errors were encountered: