apply black and isort (#4287)

* apply black and isort

* move some type ignores
This commit is contained in:
Jelle Zijlstra
2020-06-28 13:31:00 -07:00
committed by GitHub
parent fe58699ca5
commit 5d553c9584
800 changed files with 13875 additions and 10332 deletions

View File

@@ -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: ...