mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
fix self in urllib (#643)
This commit is contained in:
committed by
Guido van Rossum
parent
59f86e1b6a
commit
090667c7b2
@@ -74,7 +74,7 @@ class BaseHandler:
|
||||
parent = ... # type: OpenerDirector
|
||||
def add_parent(self, parent: OpenerDirector) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def http_error_nnn(req: Request, fp: IO[str], code: int, msg: int,
|
||||
def http_error_nnn(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
hdrs: Mapping[str, str]) -> _UrlopenRet: ...
|
||||
|
||||
class HTTPDefaultErrorHandler(BaseHandler): ...
|
||||
@@ -117,9 +117,9 @@ if sys.version_info >= (3, 5):
|
||||
def add_password(self, realm: str, uri: Union[str, Sequence[str]],
|
||||
user: str, passwd: str,
|
||||
is_authenticated: bool = ...) -> None: ...
|
||||
def update_authenticated(uri: Union[str, Sequence[str]],
|
||||
def update_authenticated(self, uri: Union[str, Sequence[str]],
|
||||
is_authenticated: bool = ...) -> None: ...
|
||||
def is_authenticated(authuri: str) -> bool: ...
|
||||
def is_authenticated(self, authuri: str) -> bool: ...
|
||||
|
||||
class AbstractBasicAuthHandler:
|
||||
def __init__(self,
|
||||
@@ -191,7 +191,7 @@ class URLopener:
|
||||
def open(self, fullurl: str, data: Optional[bytes] = ...) -> _UrlopenRet: ...
|
||||
def open_unknown(self, fullurl: str,
|
||||
data: Optional[bytes] = ...) -> _UrlopenRet: ...
|
||||
def retrieve(url: str, filename: Optional[str] = ...,
|
||||
def retrieve(self, url: str, filename: Optional[str] = ...,
|
||||
reporthook: Optional[Callable[[int, int, int], None]] = ...,
|
||||
data: Optional[bytes] = ...) -> Tuple[str, Optional[Message]]: ...
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import sys
|
||||
_RequestRate = NamedTuple('_RequestRate', [('requests', int), ('seconds', int)])
|
||||
|
||||
class RobotFileParser:
|
||||
def __init__(url: str = ...) -> None: ...
|
||||
def __init__(self, url: str = ...) -> None: ...
|
||||
def set_url(self, url: str) -> None: ...
|
||||
def read(self) -> None: ...
|
||||
def parse(self, lines: Iterable[str]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user