Skip to content

Support __call__ on metaclasses #14122

Description

@ilevkivskyi

Currently we don't handle __call__() on metaclasses correctly. For example:

class M(type):
    def __call__(self, x: int) -> Any: ...

class C(metaclass=M): ...

C(x=1)

results in a false positive. Also similarly handling of metaclass __call__() in protocols is not very principled, see e.g. #14121

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions