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,6 +1,6 @@
import sys
from typing import (Optional, Sequence, Union, Generic, overload,
Iterable, Iterator, Sized, ContextManager, AnyStr)
from typing import AnyStr, ContextManager, Generic, Iterable, Iterator, Optional, Sequence, Sized, Union, overload
from _typeshed import ReadableBuffer
ACCESS_DEFAULT: int
@@ -10,7 +10,7 @@ ACCESS_COPY: int
ALLOCATIONGRANULARITY: int
if sys.platform != 'win32':
if sys.platform != "win32":
MAP_ANON: int
MAP_ANONYMOUS: int
MAP_DENYWRITE: int
@@ -24,15 +24,14 @@ if sys.platform != 'win32':
PAGESIZE: int
class _mmap(Generic[AnyStr]):
if sys.platform == 'win32':
def __init__(self, fileno: int, length: int,
tagname: Optional[str] = ..., access: int = ...,
offset: int = ...) -> None: ...
if sys.platform == "win32":
def __init__(
self, fileno: int, length: int, tagname: Optional[str] = ..., access: int = ..., offset: int = ...
) -> None: ...
else:
def __init__(self,
fileno: int, length: int, flags: int = ...,
prot: int = ..., access: int = ...,
offset: int = ...) -> None: ...
def __init__(
self, fileno: int, length: int, flags: int = ..., prot: int = ..., access: int = ..., offset: int = ...
) -> None: ...
def close(self) -> None: ...
if sys.version_info >= (3, 8):
def flush(self, offset: int = ..., size: int = ...) -> None: ...
@@ -72,6 +71,7 @@ if sys.version_info >= (3,):
# Doesn't actually exist, but the object is actually iterable because it has __getitem__ and
# __len__, so we claim that there is also an __iter__ to help type checkers.
def __iter__(self) -> Iterator[bytes]: ...
else:
class mmap(_mmap[bytes], Sequence[bytes]):
def find(self, string: bytes, start: int = ..., end: int = ...) -> int: ...