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
@elazarg I think the use case where metaclass is not an instance of type is quite rare, and (more importantly) this case could be difficult to typecheck. I think mypy could give an error message like: Metaclasses not inheriting from "type" are not yet supported.
Activity
elazarg commentedon Feb 7, 2017
I am for fixing it. The reason I have allowed this behavior is the documentation.
Quote:
The appropriate metaclass for a class definition is determined as follows:
End quote.
What do you think?
ilevkivskyi commentedon Feb 7, 2017
@elazarg I think the use case where metaclass is not an instance of
typeis quite rare, and (more importantly) this case could be difficult to typecheck. I think mypy could give an error message like:Metaclasses not inheriting from "type" are not yet supported.elazarg commentedon Feb 7, 2017
I have a branch ready
, but it requires multiple changes to typeshed before it can be merged.Do not support metaclasses not inheriting from type (#2820)