From e7ee36a2e6d3de840b64530f6583948bb42dda74 Mon Sep 17 00:00:00 2001 From: Elazar Gershuni Date: Sun, 30 Oct 2016 20:56:38 +0200 Subject: [PATCH] fix self in urllib --- stdlib/3/urllib/request.pyi | 8 ++++---- stdlib/3/urllib/robotparser.pyi | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stdlib/3/urllib/request.pyi b/stdlib/3/urllib/request.pyi index 6786510c97b1..08262307ceb4 100644 --- a/stdlib/3/urllib/request.pyi +++ b/stdlib/3/urllib/request.pyi @@ -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]]: ... diff --git a/stdlib/3/urllib/robotparser.pyi b/stdlib/3/urllib/robotparser.pyi index e8403f7a7477..11ead4f390c2 100644 --- a/stdlib/3/urllib/robotparser.pyi +++ b/stdlib/3/urllib/robotparser.pyi @@ -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: ...