Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,6 +1,6 @@
import unittest.case
from types import TracebackType
from typing import Any, Callable, List, Optional, TextIO, Tuple, Type, TypeVar, Union
from typing import Any, Callable, List, TextIO, Tuple, Type, TypeVar, Union
_SysExcInfoType = Union[Tuple[Type[BaseException], BaseException, TracebackType], Tuple[None, None, None]]
@@ -20,9 +20,7 @@ class TestResult:
buffer: bool
failfast: bool
tb_locals: bool
def __init__(
self, stream: Optional[TextIO] = ..., descriptions: Optional[bool] = ..., verbosity: Optional[int] = ...
) -> None: ...
def __init__(self, stream: TextIO | None = ..., descriptions: bool | None = ..., verbosity: int | None = ...) -> None: ...
def printErrors(self) -> None: ...
def wasSuccessful(self) -> bool: ...
def stop(self) -> None: ...
@@ -36,6 +34,4 @@ class TestResult:
def addSkip(self, test: unittest.case.TestCase, reason: str) -> None: ...
def addExpectedFailure(self, test: unittest.case.TestCase, err: _SysExcInfoType) -> None: ...
def addUnexpectedSuccess(self, test: unittest.case.TestCase) -> None: ...
def addSubTest(
self, test: unittest.case.TestCase, subtest: unittest.case.TestCase, err: Optional[_SysExcInfoType]
) -> None: ...
def addSubTest(self, test: unittest.case.TestCase, subtest: unittest.case.TestCase, err: _SysExcInfoType | None) -> None: ...