Skip to content

Should be cls in metaclass #164

Open
@Dreamsorcerer

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions