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,12 +1,14 @@
from typing import List, Tuple, Any, TextIO, Union, Optional, Iterable, TypeVar
import sys
from typing import Any, Iterable, List, Optional, TextIO, Tuple, TypeVar, Union
def split(s: str, comments: bool = ..., posix: bool = ...) -> List[str]: ...
if sys.version_info >= (3, 8):
def join(split_command: Iterable[str]) -> str: ...
def quote(s: str) -> str: ...
_SLT = TypeVar('_SLT', bound=shlex)
_SLT = TypeVar("_SLT", bound=shlex)
class shlex(Iterable[str]):
commenters: str
@@ -27,11 +29,15 @@ class shlex(Iterable[str]):
punctuation_chars: str
if sys.version_info >= (3, 6):
def __init__(self, instream: Union[str, TextIO] = ..., infile: Optional[str] = ...,
posix: bool = ..., punctuation_chars: Union[bool, str] = ...) -> None: ...
def __init__(
self,
instream: Union[str, TextIO] = ...,
infile: Optional[str] = ...,
posix: bool = ...,
punctuation_chars: Union[bool, str] = ...,
) -> None: ...
else:
def __init__(self, instream: Union[str, TextIO] = ..., infile: Optional[str] = ...,
posix: bool = ...) -> None: ...
def __init__(self, instream: Union[str, TextIO] = ..., infile: Optional[str] = ..., posix: bool = ...) -> None: ...
def get_token(self) -> str: ...
def push_token(self, tok: str) -> None: ...
def read_token(self) -> str: ...
@@ -39,7 +45,6 @@ class shlex(Iterable[str]):
# TODO argument types
def push_source(self, newstream: Any, newfile: Any = ...) -> None: ...
def pop_source(self) -> None: ...
def error_leader(self, infile: str = ...,
lineno: int = ...) -> None: ...
def error_leader(self, infile: str = ..., lineno: int = ...) -> None: ...
def __iter__(self: _SLT) -> _SLT: ...
def __next__(self) -> str: ...