-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
from typing import TypeVar, Generic
T = TypeVar("T")
class FooMetaclass(type, Generic[T]): pass
class Foo(metaclass=FooMetaclass[T]): # error: Dynamic metaclass not supported for "Foo"
passaccording to the documentation:
Mypy does not understand dynamically-computed metaclasses, such as
class A(metaclass=f()): ...
however this isn't dynamically computed, it's just a generic so mypy should be able to understand it statically
Reactions are currently unavailable