Avoid using string literals in type annotations (#2294)

This commit is contained in:
Yusuke Miyazaki
2018-07-03 12:23:29 +09:00
committed by Jelle Zijlstra
parent 25ad95de4f
commit 6192cce9d9
50 changed files with 175 additions and 175 deletions

View File

@@ -18,11 +18,11 @@ class _ResultMixinBase(Generic[AnyStr]):
def geturl(self) -> AnyStr: ...
class _ResultMixinStr(_ResultMixinBase[str]):
def encode(self, encoding: str = ..., errors: str = ...) -> '_ResultMixinBytes': ...
def encode(self, encoding: str = ..., errors: str = ...) -> _ResultMixinBytes: ...
class _ResultMixinBytes(_ResultMixinBase[str]):
def decode(self, encoding: str = ..., errors: str = ...) -> '_ResultMixinStr': ...
def decode(self, encoding: str = ..., errors: str = ...) -> _ResultMixinStr: ...
class _NetlocResultMixinBase(Generic[AnyStr]):

View File

@@ -17,7 +17,7 @@ _UrlopenRet = Union[HTTPResponse, addinfourl]
def urlopen(
url: Union[str, 'Request'], data: Optional[bytes] = ...,
url: Union[str, Request], data: Optional[bytes] = ...,
timeout: float = ..., *, cafile: Optional[str] = ...,
capath: Optional[str] = ..., cadefault: bool = ...,
context: Optional[ssl.SSLContext] = ...