Use variable annotations everywhere (#2909)

This commit is contained in:
Michael Lee
2019-04-13 01:40:52 -07:00
committed by Sebastian Rittau
parent b3c76aab49
commit efb67946f8
458 changed files with 9135 additions and 9135 deletions

View File

@@ -4,9 +4,9 @@ from urllib.response import addinfourl
# Stubs for urllib.error
class URLError(IOError):
reason = ... # type: Union[str, BaseException]
reason: Union[str, BaseException]
class HTTPError(URLError, addinfourl):
code = ... # type: int
headers = ... # type: Dict[str, str]
code: int
headers: Dict[str, str]
def __init__(self, url, code, msg, hdrs, fp) -> None: ...
class ContentTooShortError(URLError): ...

View File

@@ -5,13 +5,13 @@ import sys
_Str = Union[bytes, str]
uses_relative = ... # type: List[str]
uses_netloc = ... # type: List[str]
uses_params = ... # type: List[str]
non_hierarchical = ... # type: List[str]
uses_query = ... # type: List[str]
uses_fragment = ... # type: List[str]
scheme_chars = ... # type: str
uses_relative: List[str]
uses_netloc: List[str]
uses_params: List[str]
non_hierarchical: List[str]
uses_query: List[str]
uses_fragment: List[str]
scheme_chars: str
MAX_CACHE_SIZE = 0
class _ResultMixinBase(Generic[AnyStr]):
@@ -26,18 +26,18 @@ class _ResultMixinBytes(_ResultMixinBase[str]):
class _NetlocResultMixinBase(Generic[AnyStr]):
username = ... # type: AnyStr
password = ... # type: AnyStr
hostname = ... # type: AnyStr
port = ... # type: int
username: AnyStr
password: AnyStr
hostname: AnyStr
port: int
class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ...
class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): ...
class _DefragResultBase(tuple, Generic[AnyStr]):
url = ... # type: AnyStr
fragment = ... # type: AnyStr
url: AnyStr
fragment: AnyStr
_SplitResultBase = NamedTuple(