mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
fix type of msg argument to HTTPRedirectHandler.redirect_request (#2949)
It's not really documented (https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPRedirectHandler.redirect_request), but logically a message is a str, and reading the code for the stdlib confirms that it's intended to be a str.
This commit is contained in:
committed by
Sebastian Rittau
parent
4d61442004
commit
8bd744a38f
@@ -85,7 +85,7 @@ class BaseHandler:
|
||||
class HTTPDefaultErrorHandler(BaseHandler): ...
|
||||
|
||||
class HTTPRedirectHandler(BaseHandler):
|
||||
def redirect_request(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
def redirect_request(self, req: Request, fp: IO[str], code: int, msg: str,
|
||||
hdrs: Mapping[str, str],
|
||||
newurl: str) -> Optional[Request]: ...
|
||||
def http_error_301(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
|
||||
Reference in New Issue
Block a user