Use recursive type aliases in builtins and _typeshed (#9134)

This commit is contained in:
Alex Waygood authored and GitHub committed 2022-11-08 17:04:09 +00:00
1 parent efa1048d42
commit 739460291b
2 files changed
+5 -12

No files matched your search

+1 -2
View File
@@ -276,5 +276,4 @@ StrOrLiteralStr = TypeVar("StrOrLiteralStr", LiteralString, str) # noqa: Y001
ProfileFunction: TypeAlias = Callable[[FrameType, str, Any], object]
# Objects suitable to be passed to sys.settrace, threading.settrace, and similar
# TODO: Ideally this would be a recursive type alias
TraceFunction: TypeAlias = Callable[[FrameType, str, Any], Callable[[FrameType, str, Any], Any] | None]
TraceFunction: TypeAlias = Callable[[FrameType, str, Any], TraceFunction | None]