mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 08:17:07 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user