mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 16:14:24 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Stubs for timeit (Python 2 and 3)
|
||||
|
||||
import sys
|
||||
from typing import Any, Callable, Dict, IO, List, Optional, Sequence, Text, Tuple, Union
|
||||
from typing import IO, Any, Callable, Dict, List, Optional, Sequence, Text, Tuple, Union
|
||||
|
||||
_str = Union[str, Text]
|
||||
_Timer = Callable[[], float]
|
||||
@@ -11,8 +11,9 @@ default_timer: _Timer
|
||||
|
||||
class Timer:
|
||||
if sys.version_info >= (3, 5):
|
||||
def __init__(self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
globals: Optional[Dict[str, Any]] = ...) -> None: ...
|
||||
def __init__(
|
||||
self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., globals: Optional[Dict[str, Any]] = ...
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...) -> None: ...
|
||||
def print_exc(self, file: Optional[IO[str]] = ...) -> None: ...
|
||||
@@ -22,13 +23,22 @@ class Timer:
|
||||
def autorange(self, callback: Optional[Callable[[int, float], Any]] = ...) -> Tuple[int, float]: ...
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
def timeit(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
number: int = ..., globals: Optional[Dict[str, Any]] = ...) -> float: ...
|
||||
def repeat(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
repeat: int = ..., number: int = ..., globals: Optional[Dict[str, Any]] = ...) -> List[float]: ...
|
||||
def timeit(
|
||||
stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., number: int = ..., globals: Optional[Dict[str, Any]] = ...
|
||||
) -> float: ...
|
||||
def repeat(
|
||||
stmt: _stmt = ...,
|
||||
setup: _stmt = ...,
|
||||
timer: _Timer = ...,
|
||||
repeat: int = ...,
|
||||
number: int = ...,
|
||||
globals: Optional[Dict[str, Any]] = ...,
|
||||
) -> List[float]: ...
|
||||
|
||||
else:
|
||||
def timeit(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
number: int = ...) -> float: ...
|
||||
def repeat(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
repeat: int = ..., number: int = ...) -> List[float]: ...
|
||||
def timeit(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., number: int = ...) -> float: ...
|
||||
def repeat(
|
||||
stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., repeat: int = ..., number: int = ...
|
||||
) -> List[float]: ...
|
||||
|
||||
def main(args: Optional[Sequence[str]]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user