mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
tweak files to fix pytype parsing errors (#1325)
* Don't use "\" to join lines
This commit is contained in:
committed by
Jelle Zijlstra
parent
e8013fd808
commit
ac0b809bf5
@@ -97,6 +97,5 @@ if sys.version_info >= (3, 3):
|
||||
display_name = ... # type: Optional[str]
|
||||
addresses = ... # type: Tuple[Address, ...]
|
||||
def __init__(self, display_name: Optional[str] = ...,
|
||||
addresses: Optional[Tuple[Address, ...]] = ...) \
|
||||
-> None: ...
|
||||
addresses: Optional[Tuple[Address, ...]] = ...) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
@@ -29,8 +29,7 @@ class Message:
|
||||
def set_unixfrom(self, unixfrom: str) -> None: ...
|
||||
def get_unixfrom(self) -> Optional[str]: ...
|
||||
def attach(self, payload: 'Message') -> None: ...
|
||||
def get_payload(self, i: int = ..., decode: bool = ...) \
|
||||
-> Optional[_PayloadType]: ...
|
||||
def get_payload(self, i: int = ..., decode: bool = ...) -> Optional[_PayloadType]: ...
|
||||
def set_payload(self, payload: _PayloadType,
|
||||
charset: _CharsetType = ...) -> None: ...
|
||||
def set_charset(self, charset: _CharsetType) -> None: ...
|
||||
@@ -45,8 +44,7 @@ class Message:
|
||||
def items(self) -> List[Tuple[str, str]]: ...
|
||||
def get(self, name: str, failobj: _T = ...) -> Union[str, _T]: ...
|
||||
def get_all(self, name: str, failobj: _T = ...) -> Union[List[str], _T]: ...
|
||||
def add_header(self, _name: str, _value: str, **_params: _ParamsType) \
|
||||
-> None: ...
|
||||
def add_header(self, _name: str, _value: str, **_params: _ParamsType) -> None: ...
|
||||
def replace_header(self, _name: str, _value: str) -> None: ...
|
||||
def get_content_type(self) -> str: ...
|
||||
def get_content_maintype(self) -> str: ...
|
||||
|
||||
@@ -83,8 +83,7 @@ class DefaultCookiePolicy(CookiePolicy):
|
||||
def set_blocked_domains(self, blocked_domains: Sequence[str]) -> None: ...
|
||||
def is_blocked(self, domain: str) -> bool: ...
|
||||
def allowed_domains(self) -> Optional[Tuple[str, ...]]: ...
|
||||
def set_allowed_domains(self, allowed_domains: Optional[Sequence[str]]) \
|
||||
-> None: ...
|
||||
def set_allowed_domains(self, allowed_domains: Optional[Sequence[str]]) -> None: ...
|
||||
def is_not_allowed(self, domain: str) -> bool: ...
|
||||
|
||||
|
||||
|
||||
@@ -205,11 +205,9 @@ class SSLContext:
|
||||
def load_default_certs(self, purpose: _PurposeType = ...) -> None: ...
|
||||
def load_verify_locations(self, cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ...,
|
||||
cadata: Union[str, bytes, None] = ...) \
|
||||
-> None: ...
|
||||
cadata: Union[str, bytes, None] = ...) -> None: ...
|
||||
def get_ca_certs(self,
|
||||
binary_form: bool = ...) \
|
||||
-> Union[List[_PeerCertRetDictType], List[bytes]]: ...
|
||||
binary_form: bool = ...) -> Union[List[_PeerCertRetDictType], List[bytes]]: ...
|
||||
else:
|
||||
def load_verify_locations(self,
|
||||
cafile: Optional[str] = ...,
|
||||
@@ -220,8 +218,7 @@ class SSLContext:
|
||||
def set_alpn_protocols(self, protocols: List[str]) -> None: ...
|
||||
def set_npn_protocols(self, protocols: List[str]) -> None: ...
|
||||
def set_servername_callback(self,
|
||||
server_name_callback: Optional[_SrvnmeCbType]) \
|
||||
-> None: ...
|
||||
server_name_callback: Optional[_SrvnmeCbType]) -> None: ...
|
||||
def load_dh_params(self, dhfile: str) -> None: ...
|
||||
def set_ecdh_curve(self, curve_name: str) -> None: ...
|
||||
def wrap_socket(self, sock: socket.socket, server_side: bool = ...,
|
||||
|
||||
@@ -106,14 +106,12 @@ class ProxyHandler(BaseHandler):
|
||||
class HTTPPasswordMgr:
|
||||
def add_password(self, realm: str, uri: Union[str, Sequence[str]],
|
||||
user: str, passwd: str) -> None: ...
|
||||
def find_user_password(self, realm: str, authuri: str) \
|
||||
-> Tuple[Optional[str], Optional[str]]: ...
|
||||
def find_user_password(self, realm: str, authuri: str) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
|
||||
class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):
|
||||
def add_password(self, realm: str, uri: Union[str, Sequence[str]],
|
||||
user: str, passwd: str) -> None: ...
|
||||
def find_user_password(self, realm: str, authuri: str) \
|
||||
-> Tuple[Optional[str], Optional[str]]: ...
|
||||
def find_user_password(self, realm: str, authuri: str) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
|
||||
|
||||
@@ -23,8 +23,6 @@ stdlib/3/concurrent/futures/__init__.pyi
|
||||
stdlib/3/concurrent/futures/_base.pyi
|
||||
stdlib/3/concurrent/futures/process.pyi
|
||||
stdlib/3/concurrent/futures/thread.pyi
|
||||
stdlib/3/email/headerregistry.pyi
|
||||
stdlib/3/email/message.pyi
|
||||
stdlib/3/email/policy.pyi
|
||||
stdlib/3/fileinput.pyi
|
||||
stdlib/3/gzip.pyi
|
||||
@@ -44,7 +42,6 @@ stdlib/3/types.pyi
|
||||
stdlib/3/unittest/__init__.pyi
|
||||
stdlib/3/unittest/mock.pyi
|
||||
stdlib/3/urllib/parse.pyi
|
||||
stdlib/3/urllib/request.pyi
|
||||
stdlib/3/wsgiref/types.pyi
|
||||
stdlib/3.4/asyncio/events.pyi
|
||||
stdlib/3.4/asyncio/futures.pyi
|
||||
|
||||
Reference in New Issue
Block a user