mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-08 02:40:58 +08:00
Avoid using string literals in type annotations (#2294)
This commit is contained in:
committed by
Jelle Zijlstra
parent
25ad95de4f
commit
6192cce9d9
@@ -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]):
|
||||
|
||||
@@ -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] = ...
|
||||
|
||||
Reference in New Issue
Block a user