We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dda393d commit 8f560d9Copy full SHA for 8f560d9
tensordict/typedtensordict.py
@@ -61,7 +61,7 @@ def _get_td_dir() -> frozenset[str]:
61
def _is_not_required(tp: Any) -> bool:
62
"""Check whether a type annotation is NotRequired[T]."""
63
origin = getattr(tp, "__origin__", None)
64
- if origin is typing.NotRequired:
+ if origin is NotRequired:
65
return True
66
origin = getattr(tp, "__class__", None)
67
if origin is not None and getattr(origin, "__name__", None) == "_SpecialForm":
0 commit comments