mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Fixing flake8 E231 errors
This commit is contained in:
@@ -42,7 +42,7 @@ class InterpolationDepthError(InterpolationError):
|
||||
|
||||
class ParsingError(Error):
|
||||
filename = ... # type: str
|
||||
errors = ... # type: list[Tuple[Any,Any]]
|
||||
errors = ... # type: list[Tuple[Any, Any]]
|
||||
def __init__(self, filename: str) -> None: ...
|
||||
def append(self, lineno: Any, line: Any) -> None: ...
|
||||
|
||||
@@ -60,8 +60,8 @@ class RawConfigParser:
|
||||
SECTCRE = ... # type: Any
|
||||
OPTCRE = ... # type: Any
|
||||
OPTCRE_NV = ... # type: Any
|
||||
def __init__(self, defaults: dict[Any,Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ...
|
||||
def defaults(self) -> dict[Any,Any]: ...
|
||||
def __init__(self, defaults: dict[Any, Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ...
|
||||
def defaults(self) -> dict[Any, Any]: ...
|
||||
def sections(self) -> list[str]: ...
|
||||
def add_section(self, section: str) -> None: ...
|
||||
def has_section(self, section: str) -> bool: ...
|
||||
@@ -69,11 +69,11 @@ class RawConfigParser:
|
||||
def read(self, filenames: str) -> list[str]: ...
|
||||
def readfp(self, fp: IO[str], filename: str = ...) -> None: ...
|
||||
def get(self, section: str, option: str) -> str: ...
|
||||
def items(self, section: str) -> list[Tuple[Any,Any]]: ...
|
||||
def items(self, section: str) -> list[Tuple[Any, Any]]: ...
|
||||
def _get(self, section: str, conv: type, option: str) -> Any: ...
|
||||
def getint(self, section: str, option: str) -> int: ...
|
||||
def getfloat(self, section: str, option: str) -> float: ...
|
||||
_boolean_states = ... # type: dict[str,bool]
|
||||
_boolean_states = ... # type: dict[str, bool]
|
||||
def getboolean(self, section: str, option: str) -> bool: ...
|
||||
def optionxform(self, optionstr: str) -> str: ...
|
||||
def has_option(self, section: str, option: str) -> bool: ...
|
||||
@@ -86,7 +86,7 @@ class RawConfigParser:
|
||||
class ConfigParser(RawConfigParser):
|
||||
_KEYCRE = ... # type: Any
|
||||
def get(self, section: str, option: str, raw: bool = ..., vars: dict = ...) -> Any: ...
|
||||
def items(self, section: str, raw: bool = ..., vars: dict = ...) -> list[Tuple[str,Any]]: ...
|
||||
def items(self, section: str, raw: bool = ..., vars: dict = ...) -> list[Tuple[str, Any]]: ...
|
||||
def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...
|
||||
def _interpolation_replace(self, match: Any) -> str: ...
|
||||
|
||||
|
||||
@@ -15,41 +15,41 @@ def register(search_function: Callable[[str], Any]) -> None: ...
|
||||
def register_error(errors: str, handler: _Handler) -> None: ...
|
||||
def lookup(a: str) -> codecs.CodecInfo: ...
|
||||
def lookup_error(a: str) -> _Handler: ...
|
||||
def decode(obj: Any, encoding:str = ..., errors:str = ...) -> Any: ...
|
||||
def encode(obj: Any, encoding:str = ..., errors:str = ...) -> Any: ...
|
||||
def decode(obj: Any, encoding: str = ..., errors: str = ...) -> Any: ...
|
||||
def encode(obj: Any, encoding: str = ..., errors: str = ...) -> Any: ...
|
||||
def charmap_build(a: unicode) -> _EncodingMap: ...
|
||||
|
||||
def ascii_decode(data: AnyStr, errors:str = ...) -> Tuple[unicode, int]: ...
|
||||
def ascii_encode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
|
||||
def ascii_decode(data: AnyStr, errors: str = ...) -> Tuple[unicode, int]: ...
|
||||
def ascii_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def charbuffer_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def charmap_decode(data: AnyStr, errors: str = ..., mapping: Optional[_EncodingMap] = ...) -> Tuple[unicode, int]: ...
|
||||
def charmap_encode(data: AnyStr, errors: str, mapping: Optional[_EncodingMap] = ...) -> Tuple[str, int]: ...
|
||||
def escape_decode(data: AnyStr, errors:str = ...) -> Tuple[unicode, int]: ...
|
||||
def escape_encode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
|
||||
def latin_1_decode(data: AnyStr, errors:str = ...) -> Tuple[unicode, int]: ...
|
||||
def latin_1_encode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
|
||||
def raw_unicode_escape_decode(data: AnyStr, errors:str = ...) -> Tuple[unicode, int]: ...
|
||||
def raw_unicode_escape_encode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
|
||||
def readbuffer_encode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
|
||||
def unicode_escape_decode(data: AnyStr, errors:str = ...) -> Tuple[unicode, int]: ...
|
||||
def unicode_escape_encode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
|
||||
def unicode_internal_decode(data: AnyStr, errors:str = ...) -> Tuple[unicode, int]: ...
|
||||
def unicode_internal_encode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
|
||||
def utf_16_be_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_be_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def utf_16_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def utf_16_ex_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_le_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_le_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def utf_32_be_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_be_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def utf_32_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def utf_32_ex_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_le_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_le_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def utf_7_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_7_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def utf_8_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_8_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
|
||||
def escape_decode(data: AnyStr, errors: str = ...) -> Tuple[unicode, int]: ...
|
||||
def escape_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def latin_1_decode(data: AnyStr, errors: str = ...) -> Tuple[unicode, int]: ...
|
||||
def latin_1_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def raw_unicode_escape_decode(data: AnyStr, errors: str = ...) -> Tuple[unicode, int]: ...
|
||||
def raw_unicode_escape_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def readbuffer_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def unicode_escape_decode(data: AnyStr, errors: str = ...) -> Tuple[unicode, int]: ...
|
||||
def unicode_escape_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def unicode_internal_decode(data: AnyStr, errors: str = ...) -> Tuple[unicode, int]: ...
|
||||
def unicode_internal_encode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
|
||||
def utf_16_be_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_be_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
def utf_16_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
def utf_16_ex_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_le_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_16_le_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
def utf_32_be_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_be_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
def utf_32_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
def utf_32_ex_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_le_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_32_le_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
def utf_7_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_7_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
def utf_8_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[unicode, int]: ...
|
||||
def utf_8_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
|
||||
|
||||
@@ -16,7 +16,7 @@ class SRE_Match(object):
|
||||
@overload
|
||||
def group(self) -> str: ...
|
||||
@overload
|
||||
def group(self, group:int = ...) -> Optional[str]: ...
|
||||
def group(self, group: int = ...) -> Optional[str]: ...
|
||||
def groupdict(self) -> Dict[int, Optional[str]]: ...
|
||||
def groups(self) -> Tuple[Optional[str]]: ...
|
||||
def span(self) -> Tuple[int, int]:
|
||||
@@ -33,17 +33,17 @@ class SRE_Pattern(object):
|
||||
groups = ... # type: int
|
||||
groupindex = ... # type: Mapping[int, int]
|
||||
indexgroup = ... # type: Sequence[int]
|
||||
def findall(self, source: str, pos:int = ..., endpos:int = ...) -> List[Union[tuple, str]]: ...
|
||||
def finditer(self, source: str, pos: int = ..., endpos:int = ...) -> Iterable[Union[tuple, str]]: ...
|
||||
def match(self, pattern, pos: int = ..., endpos:int = ...) -> SRE_Match: ...
|
||||
def findall(self, source: str, pos: int = ..., endpos: int = ...) -> List[Union[tuple, str]]: ...
|
||||
def finditer(self, source: str, pos: int = ..., endpos: int = ...) -> Iterable[Union[tuple, str]]: ...
|
||||
def match(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ...
|
||||
def scanner(self, s: str, start: int = ..., end: int = ...) -> SRE_Scanner: ...
|
||||
def search(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ...
|
||||
def split(self, source: str, maxsplit:int = ...) -> List[Optional[str]]: ...
|
||||
def sub(self, repl: str, string: str, count:int = ...) -> tuple: ...
|
||||
def subn(self, repl: str, string: str, count:int = ...) -> tuple: ...
|
||||
def split(self, source: str, maxsplit: int = ...) -> List[Optional[str]]: ...
|
||||
def sub(self, repl: str, string: str, count: int = ...) -> tuple: ...
|
||||
def subn(self, repl: str, string: str, count: int = ...) -> tuple: ...
|
||||
|
||||
def compile(pattern: str, flags: int, code: List[int],
|
||||
groups:int = ...,
|
||||
groups: int = ...,
|
||||
groupindex: Mapping[int, int] = ...,
|
||||
indexgroup: Sequence[int] = ...) -> SRE_Pattern:
|
||||
raise OverflowError()
|
||||
|
||||
@@ -11,8 +11,8 @@ class Struct(object):
|
||||
def __init__(self, fmt: str) -> None: ...
|
||||
def pack_into(self, buffer: bytearray, offset: int, obj: Any) -> None: ...
|
||||
def pack(self, *args) -> str: ...
|
||||
def unpack(self, s:str) -> Tuple[Any]: ...
|
||||
def unpack_from(self, buffer: bytearray, offset:int = ...) -> Tuple[Any]: ...
|
||||
def unpack(self, s: str) -> Tuple[Any]: ...
|
||||
def unpack_from(self, buffer: bytearray, offset: int = ...) -> Tuple[Any]: ...
|
||||
|
||||
def _clearcache() -> None: ...
|
||||
def calcsize(fmt: str) -> int: ...
|
||||
|
||||
@@ -4,8 +4,8 @@ default_action = ... # type: str
|
||||
filters = ... # type: List[tuple]
|
||||
once_registry = ... # type: dict
|
||||
|
||||
def warn(message: Warning, category:type = ..., stacklevel:int = ...) -> None: ...
|
||||
def warn_explicit(message: Warning, category:type,
|
||||
def warn(message: Warning, category: type = ..., stacklevel: int = ...) -> None: ...
|
||||
def warn_explicit(message: Warning, category: type,
|
||||
filename: str, lineno: int,
|
||||
module:Any = ..., registry:dict = ...,
|
||||
module_globals:dict = ...) -> None: ...
|
||||
module: Any = ..., registry: dict = ...,
|
||||
module_globals: dict = ...) -> None: ...
|
||||
|
||||
@@ -13,5 +13,5 @@ def getopt(args: List[str], shortopts: str,
|
||||
List[str]]: ...
|
||||
|
||||
def gnu_getopt(args: List[str], shortopts: str,
|
||||
longopts: List[str]=...) -> Tuple[List[Tuple[str,str]],
|
||||
longopts: List[str]=...) -> Tuple[List[Tuple[str, str]],
|
||||
List[str]]: ...
|
||||
|
||||
@@ -28,7 +28,7 @@ class HTTPResponse:
|
||||
chunk_left = ... # type: Any
|
||||
length = ... # type: Any
|
||||
will_close = ... # type: Any
|
||||
def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering:bool=...) -> None: ...
|
||||
def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering: bool=...) -> None: ...
|
||||
def begin(self): ...
|
||||
def close(self): ...
|
||||
def isclosed(self): ...
|
||||
@@ -56,16 +56,16 @@ class HTTPConnection:
|
||||
def putheader(self, header, *values): ...
|
||||
def endheaders(self, message_body=None): ...
|
||||
def request(self, method, url, body=None, headers=...): ...
|
||||
def getresponse(self, buffering:bool=...): ...
|
||||
def getresponse(self, buffering: bool=...): ...
|
||||
|
||||
class HTTP:
|
||||
debuglevel = ... # type: Any
|
||||
def __init__(self, host:str=..., port=None, strict=None) -> None: ...
|
||||
def __init__(self, host: str=..., port=None, strict=None) -> None: ...
|
||||
def connect(self, host=None, port=None): ...
|
||||
def getfile(self): ...
|
||||
file = ... # type: Any
|
||||
headers = ... # type: Any
|
||||
def getreply(self, buffering:bool=...): ...
|
||||
def getreply(self, buffering: bool=...): ...
|
||||
def close(self): ...
|
||||
|
||||
class HTTPSConnection(HTTPConnection):
|
||||
@@ -79,7 +79,7 @@ class HTTPSConnection(HTTPConnection):
|
||||
class HTTPS(HTTP):
|
||||
key_file = ... # type: Any
|
||||
cert_file = ... # type: Any
|
||||
def __init__(self, host:str=..., port=None, key_file=None, cert_file=None, strict=None, context=None) -> None: ...
|
||||
def __init__(self, host: str=..., port=None, key_file=None, cert_file=None, strict=None, context=None) -> None: ...
|
||||
|
||||
class HTTPException(Exception): ...
|
||||
class NotConnected(HTTPException): ...
|
||||
|
||||
@@ -13,5 +13,5 @@ class struct_passwd(tuple):
|
||||
pw_uid = ... # type: int
|
||||
|
||||
def getpwall() -> List[struct_passwd]: ...
|
||||
def getpwnam(name:str) -> struct_passwd: ...
|
||||
def getpwuid(uid:int) -> struct_passwd: ...
|
||||
def getpwnam(name: str) -> struct_passwd: ...
|
||||
def getpwuid(uid: int) -> struct_passwd: ...
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
# 'bytes' support added by Jukka Lehtosalo
|
||||
|
||||
# based on: http://docs.python.org/2.7/library/re.html
|
||||
# based on: http: //docs.python.org/2.7/library/re.html
|
||||
|
||||
from typing import (
|
||||
List, Iterator, overload, Callable, Tuple, Sequence, Dict,
|
||||
@@ -36,24 +36,24 @@ def compile(pattern: Pattern[AnyStr], flags: int = ...) -> Pattern[AnyStr]: ...
|
||||
@overload
|
||||
def search(pattern: Union[str, unicode], string: AnyStr, flags: int = ...) -> Match[AnyStr]: ...
|
||||
@overload
|
||||
def search(pattern: Union[Pattern[str],Pattern[unicode]], string: AnyStr, flags: int = ...) -> Match[AnyStr]: ...
|
||||
def search(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, flags: int = ...) -> Match[AnyStr]: ...
|
||||
|
||||
@overload
|
||||
def match(pattern: Union[str, unicode], string: AnyStr, flags: int = ...) -> Match[AnyStr]: ...
|
||||
@overload
|
||||
def match(pattern: Union[Pattern[str],Pattern[unicode]], string: AnyStr, flags: int = ...) -> Match[AnyStr]: ...
|
||||
def match(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, flags: int = ...) -> Match[AnyStr]: ...
|
||||
|
||||
@overload
|
||||
def split(pattern: Union[str, unicode], string: AnyStr,
|
||||
maxsplit: int = ..., flags: int = ...) -> List[AnyStr]: ...
|
||||
@overload
|
||||
def split(pattern: Union[Pattern[str],Pattern[unicode]], string: AnyStr,
|
||||
def split(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr,
|
||||
maxsplit: int = ..., flags: int = ...) -> List[AnyStr]: ...
|
||||
|
||||
@overload
|
||||
def findall(pattern: Union[str, unicode], string: AnyStr, flags: int = ...) -> List[Any]: ...
|
||||
@overload
|
||||
def findall(pattern: Union[Pattern[str],Pattern[unicode]], string: AnyStr, flags: int = ...) -> List[Any]: ...
|
||||
def findall(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, flags: int = ...) -> List[Any]: ...
|
||||
|
||||
# Return an iterator yielding match objects over all non-overlapping matches
|
||||
# for the RE pattern in string. The string is scanned left-to-right, and
|
||||
@@ -63,7 +63,7 @@ def findall(pattern: Union[Pattern[str],Pattern[unicode]], string: AnyStr, flags
|
||||
def finditer(pattern: Union[str, unicode], string: AnyStr,
|
||||
flags: int = ...) -> Iterator[Match[AnyStr]]: ...
|
||||
@overload
|
||||
def finditer(pattern: Union[Pattern[str],Pattern[unicode]], string: AnyStr,
|
||||
def finditer(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr,
|
||||
flags: int = ...) -> Iterator[Match[AnyStr]]: ...
|
||||
|
||||
@overload
|
||||
@@ -73,10 +73,10 @@ def sub(pattern: Union[str, unicode], repl: AnyStr, string: AnyStr, count: int =
|
||||
def sub(pattern: Union[str, unicode], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
string: AnyStr, count: int = ..., flags: int = ...) -> AnyStr: ...
|
||||
@overload
|
||||
def sub(pattern: Union[Pattern[str],Pattern[unicode]], repl: AnyStr, string: AnyStr, count: int = ...,
|
||||
def sub(pattern: Union[Pattern[str], Pattern[unicode]], repl: AnyStr, string: AnyStr, count: int = ...,
|
||||
flags: int = ...) -> AnyStr: ...
|
||||
@overload
|
||||
def sub(pattern: Union[Pattern[str],Pattern[unicode]], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
def sub(pattern: Union[Pattern[str], Pattern[unicode]], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
string: AnyStr, count: int = ..., flags: int = ...) -> AnyStr: ...
|
||||
|
||||
@overload
|
||||
@@ -87,10 +87,10 @@ def subn(pattern: Union[str, unicode], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
string: AnyStr, count: int = ...,
|
||||
flags: int = ...) -> Tuple[AnyStr, int]: ...
|
||||
@overload
|
||||
def subn(pattern: Union[Pattern[str],Pattern[unicode]], repl: AnyStr, string: AnyStr, count: int = ...,
|
||||
def subn(pattern: Union[Pattern[str], Pattern[unicode]], repl: AnyStr, string: AnyStr, count: int = ...,
|
||||
flags: int = ...) -> Tuple[AnyStr, int]: ...
|
||||
@overload
|
||||
def subn(pattern: Union[Pattern[str],Pattern[unicode]], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
def subn(pattern: Union[Pattern[str], Pattern[unicode]], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
string: AnyStr, count: int = ...,
|
||||
flags: int = ...) -> Tuple[AnyStr, int]: ...
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ whitespace = ... # type: str
|
||||
def atof(a: str) -> float:
|
||||
raise DeprecationWarning()
|
||||
|
||||
def atoi(a: str, base:int = ...) -> int:
|
||||
def atoi(a: str, base: int = ...) -> int:
|
||||
raise DeprecationWarning()
|
||||
|
||||
def atol(a: str, base:int = ...) -> long:
|
||||
def atol(a: str, base: int = ...) -> long:
|
||||
raise DeprecationWarning()
|
||||
|
||||
def capitalize(s: str) -> str:
|
||||
@@ -21,18 +21,18 @@ def capitalize(s: str) -> str:
|
||||
def count(s: str, sub: str, start: int = ..., end: int = ...) -> int:
|
||||
raise DeprecationWarning()
|
||||
|
||||
def expandtabs(string:str, tabsize:int = ...) -> str:
|
||||
def expandtabs(string: str, tabsize: int = ...) -> str:
|
||||
raise DeprecationWarning()
|
||||
raise OverflowError()
|
||||
|
||||
def find(s: str, sub: str, start: int = ..., end: int = ...) -> int:
|
||||
raise DeprecationWarning()
|
||||
|
||||
def join(list: Sequence[str], sep:str = ...) -> str:
|
||||
def join(list: Sequence[str], sep: str = ...) -> str:
|
||||
raise DeprecationWarning()
|
||||
raise OverflowError()
|
||||
|
||||
def joinfields(list: Sequence[str], sep:str = ...) -> str:
|
||||
def joinfields(list: Sequence[str], sep: str = ...) -> str:
|
||||
raise DeprecationWarning()
|
||||
raise OverflowError()
|
||||
|
||||
@@ -44,7 +44,7 @@ def lstrip(s: str) -> str:
|
||||
|
||||
def maketrans(frm: str, to: str) -> str: ...
|
||||
|
||||
def replace(s: str, old: str, new: str, maxsplit:int = ...) -> str:
|
||||
def replace(s: str, old: str, new: str, maxsplit: int = ...) -> str:
|
||||
raise DeprecationWarning()
|
||||
|
||||
def rfind(s: str, sub: str, start: int = ..., end: int = ...) -> int:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Stubs for tempfile
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
# based on http://docs.python.org/3.3/library/tempfile.html
|
||||
# based on http: //docs.python.org/3.3/library/tempfile.html
|
||||
# Adapted for Python 2.7 by Michal Pokorny
|
||||
|
||||
# TODO: Don't use basestring. Use Union[str, bytes] or AnyStr for arguments.
|
||||
@@ -34,7 +34,7 @@ class _TemporaryFileWrapper(IO[str]):
|
||||
delete = ... # type: bool
|
||||
file = ... # type: IO
|
||||
name = ... # type: Any
|
||||
def __init__(self, file: IO, name, delete:bool = ...) -> None: ...
|
||||
def __init__(self, file: IO, name, delete: bool = ...) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
def __enter__(self) -> "_TemporaryFileWrapper": ...
|
||||
def __exit__(self, exc, value, tb) -> bool: ...
|
||||
|
||||
@@ -80,16 +80,16 @@ class Iterator(Iterable[_T_co], Generic[_T_co]):
|
||||
|
||||
class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
|
||||
@abstractmethod
|
||||
def next(self) -> _T_co:...
|
||||
def next(self) -> _T_co: ...
|
||||
|
||||
@abstractmethod
|
||||
def send(self, value: _T_contra) -> _T_co:...
|
||||
def send(self, value: _T_contra) -> _T_co: ...
|
||||
|
||||
@abstractmethod
|
||||
def throw(self, typ: BaseException, val: Any = None, tb: Any = None) -> None:...
|
||||
def throw(self, typ: BaseException, val: Any = None, tb: Any = None) -> None: ...
|
||||
|
||||
@abstractmethod
|
||||
def close(self) -> None:...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class Container(Generic[_T_co]):
|
||||
@abstractmethod
|
||||
@@ -176,7 +176,7 @@ class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]):
|
||||
|
||||
class Mapping(Sized, Iterable[_KT], Container[_KT], Generic[_KT, _VT_co]):
|
||||
# TODO: We wish the key type could also be covariant, but that doesn't work,
|
||||
# see discussion in https://github.com/python/typing/pull/273.
|
||||
# see discussion in https: //github.com/python/typing/pull/273.
|
||||
@abstractmethod
|
||||
def __getitem__(self, k: _KT) -> _VT_co:
|
||||
...
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from typing import Any
|
||||
|
||||
def bench(obj: Any, name: str, n:int = ...) -> float: ...
|
||||
def bench(obj: Any, name: str, n: int = ...) -> float: ...
|
||||
|
||||
class spamdict(dict):
|
||||
state = ... # type: int
|
||||
|
||||
Reference in New Issue
Block a user