Open
Description
from abc import ABC, ABCMeta
from typing import Protocol
a: ABCMeta
a = Protocol # erm, error: "type[type]" is not assignable to "type[ABCMeta]"
a = ABC
mypy in real life
class Interface(Protocol):
def f(self):
print("hi")
class Data(Interface, Enum): # runtime error: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
a = 1