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
fromtypingimportTypeVar, Type, Iterable, IteratorT=TypeVar('T')
classM(type):
def__iter__(self: Type[T]) ->Iterator[T]: raiseExceptionclassA(metaclass=M): passx: Iterable[A] =A# finey: Iterable[str] =A# should be rejected, but it is not
This pattern is important for enums, and came up in python/typeshed#1755. @ilevkivskyinoted that this is likely due to a bug in bind_self (see there).
The text was updated successfully, but these errors were encountered:
In general bind_self is buggy and ad-hoc. But when I tried to do it "right" it feels like it means making a class MemberChecker with all the context carried around by ExpressionChecker and TypeChecker.
This pattern is important for enums, and came up in python/typeshed#1755. @ilevkivskyi noted that this is likely due to a bug in
bind_self
(see there).The text was updated successfully, but these errors were encountered: