You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems related to issue #89489 but I'm not sure if it's the same problem.
I have a metaclass that examines the __annotations__ of its instances. At one point, I check whether the type of an annotated field is a subclass of int (e.g., an enum.IntEnum subclass) by issubclass(field_type, int). It works fine unless the type is a typing._GenericAlias such as typing.Optional[bytes] in which case it raises an error: