We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16301ff commit 87a939fCopy full SHA for 87a939f
src/thread/_types.py
@@ -57,8 +57,8 @@ class SupportsGetItem(Protocol[_SupportsGetItem_T]):
57
__getitem__: Callable[..., _SupportsGetItem_T]
58
59
60
+# Looks like having this inherit __getitem__ from SupportsGetItem breaks isinstance checks in python3.12
61
+# Thus we explicitly define it
62
@runtime_checkable
-class SupportsLengthGetItem(
- SupportsGetItem[_SupportsGetItem_T], SupportsLength, Protocol
63
-):
64
- pass
+class SupportsLengthGetItem(Sized, Protocol[_SupportsGetItem_T]):
+ __getitem__: Callable[..., _SupportsGetItem_T]
0 commit comments