mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user