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

@@ -2,7 +2,7 @@
# Based on http://docs.python.org/3.2/library/string.html
from typing import Any, AnyStr, Iterable, List, Mapping, Optional, overload, Sequence, Text, Tuple, Union
from typing import Any, AnyStr, Iterable, List, Mapping, Optional, Sequence, Text, Tuple, Union, overload
ascii_letters: str
ascii_lowercase: str
@@ -18,6 +18,7 @@ uppercase: str
whitespace: str
def capwords(s: AnyStr, sep: AnyStr = ...) -> AnyStr: ...
# TODO: originally named 'from'
def maketrans(_from: str, to: str) -> str: ...
def atof(s: unicode) -> float: ...
@@ -49,7 +50,6 @@ def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = ...) -> AnySt
class Template:
template: Text
def __init__(self, template: Text) -> None: ...
@overload
def substitute(self, mapping: Union[Mapping[str, str], Mapping[unicode, str]] = ..., **kwds: str) -> str: ...
@@ -63,13 +63,10 @@ class Template:
# TODO(MichalPokorny): This is probably badly and/or loosely typed.
class Formatter(object):
def format(self, format_string: str, *args, **kwargs) -> str: ...
def vformat(self, format_string: str, args: Sequence[Any],
kwargs: Mapping[str, Any]) -> str: ...
def vformat(self, format_string: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> str: ...
def parse(self, format_string: str) -> Iterable[Tuple[str, str, str, str]]: ...
def get_field(self, field_name: str, args: Sequence[Any],
kwargs: Mapping[str, Any]) -> Any: ...
def get_field(self, field_name: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
def get_value(self, key: Union[int, str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
def check_unused_args(self, used_args: Sequence[Union[int, str]], args: Sequence[Any],
kwargs: Mapping[str, Any]) -> None: ...
def check_unused_args(self, used_args: Sequence[Union[int, str]], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ...
def format_field(self, value: Any, format_spec: str) -> Any: ...
def convert_field(self, value: Any, conversion: str) -> Any: ...