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
The second-to-last line should probably be accepted by mypy, but it currently generates an error because Type[A] isn't compatible with the metaclass of M:
fromtypingimportTypeclassM(type): passclassA(metaclass=M): passa: Type[A] =Am: M=a# error, but should be okaym2: M=A# no error
What's more, in the same PR I've made M compatible with Type[A], even though it is demonstrably unsafe... I would like to fix this too, but EnumMeta is relying on it.
Activity
elazarg commentedon May 9, 2017
This was introduced by me in #2837: the metaclass lookup is performed on the wrong side.
elazarg commentedon May 9, 2017
What's more, in the same PR I've made M compatible with Type[A], even though it is demonstrably unsafe... I would like to fix this too, but EnumMeta is relying on it.