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
Suppose we have an Enum called MyEnum, and we try something like MyEnum["foo"], mypy will give us an error Value of type "MyEnum" is not indexable. We believe this is because mypy has trouble recognizing when a metaclass implements __getitem__.
A workaround is to do getattr(MyEnum, "foo"), but it'd be nice to have an actual fix.