Check this out yo:
In [1]: from typing import Sequence
In [2]: class DumbSeq(Sequence): pass
In [3]: issubclass(tuple, DumbSeq)
Out[3]: True
This has to do with the implementation of GenericMeta, where our __subclasscheck__ ends with this line:
return issubclass(cls, self.__extra__)
And for the container classes in typing, they're defined to have the collections.abc classes as their __extra__.
Pondering a fix to suggest.
Check this out yo:
This has to do with the implementation of
GenericMeta, where our__subclasscheck__ends with this line:And for the container classes in
typing, they're defined to have thecollections.abcclasses as their__extra__.Pondering a fix to suggest.