mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import unittest.case
|
||||
import unittest.result
|
||||
import unittest.suite
|
||||
from typing import Callable, Optional, TextIO, Tuple, Type, Union
|
||||
from typing import Callable, TextIO, Tuple, Type
|
||||
|
||||
_ResultClassType = Callable[[TextIO, bool, int], unittest.result.TestResult]
|
||||
|
||||
@@ -21,15 +21,15 @@ class TextTestRunner(object):
|
||||
resultclass: _ResultClassType
|
||||
def __init__(
|
||||
self,
|
||||
stream: Optional[TextIO] = ...,
|
||||
stream: TextIO | None = ...,
|
||||
descriptions: bool = ...,
|
||||
verbosity: int = ...,
|
||||
failfast: bool = ...,
|
||||
buffer: bool = ...,
|
||||
resultclass: Optional[_ResultClassType] = ...,
|
||||
warnings: Optional[Type[Warning]] = ...,
|
||||
resultclass: _ResultClassType | None = ...,
|
||||
warnings: Type[Warning] | None = ...,
|
||||
*,
|
||||
tb_locals: bool = ...,
|
||||
) -> None: ...
|
||||
def _makeResult(self) -> unittest.result.TestResult: ...
|
||||
def run(self, test: Union[unittest.suite.TestSuite, unittest.case.TestCase]) -> unittest.result.TestResult: ...
|
||||
def run(self, test: unittest.suite.TestSuite | unittest.case.TestCase) -> unittest.result.TestResult: ...
|
||||
|
||||
Reference in New Issue
Block a user