We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ce9922 commit 1377933Copy full SHA for 1377933
1 file changed
src/thread/_types.py
@@ -49,11 +49,16 @@ class SupportsLength(Sized, Protocol):
49
pass
50
51
52
+_SupportsGetItem_T = TypeVar('_SupportsGetItem_T')
53
+
54
55
@runtime_checkable
-class SupportsGetItem(Protocol[_Dataset_T]):
- def __getitem__(self, i: int) -> _Dataset_T: ...
56
+class SupportsGetItem(Protocol[_SupportsGetItem_T]):
57
+ __getitem__: Callable[..., _SupportsGetItem_T]
58
59
60
-class SupportsLengthGetItem(SupportsGetItem[_Dataset_T], SupportsLength, Protocol):
61
+class SupportsLengthGetItem(
62
+ SupportsGetItem[_SupportsGetItem_T], SupportsLength, Protocol
63
+):
64
0 commit comments