Skip to content

Commit 4abb5f5

Browse files
committed
Precise type checking in Special.__class_getitem__
1 parent d44bc42 commit 4abb5f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pyannotating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class Special:
185185
"""
186186

187187
def __class_getitem__(cls, annotation_resource: tuple[Any, Any] | Any) -> Any:
188-
if not isinstance(annotation_resource, Iterable):
188+
if not isinstance(annotation_resource, tuple):
189189
return Any
190190

191191
elif len(annotation_resource) != 2:

0 commit comments

Comments
 (0)