Skip to content

Respect signature of metaclass's __call__ #2288

@taminomara

Description

@taminomara

Another feature request similar to #281: respect signature of __call__ defined on a metaclass.

class Meta(type):
    def __call__(cls, arg: int) -> str: ...

class T(metaclass=Meta):
    pass

# Inferred type: `T`, should be `str`.
t = T()  # Should report missing argument `arg`.

Metadata

Metadata

Assignees

Labels

typing semanticstyping-module features, spec compliance, etc

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions