Use new union syntax in rest of stdlib (#5884)

This commit is contained in:
Akuli
2021-08-08 16:44:30 +03:00
committed by GitHub
parent ebacd320a3
commit df6a211855
7 changed files with 177 additions and 228 deletions

View File

@@ -15,7 +15,7 @@ class LockType:
def locked(self) -> bool: ...
def __enter__(self) -> bool: ...
def __exit__(
self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]
self, type: Type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
) -> None: ...
def start_new_thread(function: Callable[..., Any], args: Tuple[Any, ...], kwargs: Dict[str, Any] = ...) -> int: ...
@@ -33,9 +33,9 @@ if sys.version_info >= (3, 8):
@property
def exc_type(self) -> Type[BaseException]: ...
@property
def exc_value(self) -> Optional[BaseException]: ...
def exc_value(self) -> BaseException | None: ...
@property
def exc_traceback(self) -> Optional[TracebackType]: ...
def exc_traceback(self) -> TracebackType | None: ...
@property
def thread(self) -> Optional[Thread]: ...
def thread(self) -> Thread | None: ...
_excepthook: Callable[[_ExceptHookArgs], Any]