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
class Aioresponses(type):
def __new__(metacls, classname, bases, class_dict):
...
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:
But, there are also cases of metacls and cls. I think it'd be safest to not validate the name in a metaclass at all, as it seems like it's not covered by PEP 8, and lacks a clear consensus on the appropriate name.
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: