mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import IO, Any, Callable, List, Optional, Sequence, Text, Union
|
||||
from typing import IO, Any, Callable, List, Sequence, Text, Union
|
||||
|
||||
_str = Union[str, Text]
|
||||
_Timer = Callable[[], float]
|
||||
@@ -8,7 +8,7 @@ default_timer: _Timer
|
||||
|
||||
class Timer:
|
||||
def __init__(self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...) -> None: ...
|
||||
def print_exc(self, file: Optional[IO[str]] = ...) -> None: ...
|
||||
def print_exc(self, file: IO[str] | None = ...) -> None: ...
|
||||
def timeit(self, number: int = ...) -> float: ...
|
||||
def repeat(self, repeat: int = ..., number: int = ...) -> List[float]: ...
|
||||
|
||||
@@ -17,4 +17,4 @@ def repeat(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., repeat: i
|
||||
|
||||
_timerFunc = Callable[[], float]
|
||||
|
||||
def main(args: Optional[Sequence[str]] = ..., *, _wrap_timer: Optional[Callable[[_timerFunc], _timerFunc]] = ...) -> None: ...
|
||||
def main(args: Sequence[str] | None = ..., *, _wrap_timer: Callable[[_timerFunc], _timerFunc] | None = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user