mirror of https://github.com/zulip/zulip.git
outgoing_http: Fix type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
cde86fbaca
commit
7f0381d4c7
|
@ -100,7 +100,6 @@ module = [
|
|||
"tornado.*",
|
||||
"twitter.*",
|
||||
"two_factor.*",
|
||||
"urllib3.*",
|
||||
"zxcvbn.*",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from typing import Any, Dict, Optional
|
||||
|
||||
import requests
|
||||
from urllib3 import HTTPResponse
|
||||
|
||||
|
||||
class OutgoingSession(requests.Session):
|
||||
|
@ -18,12 +17,12 @@ class OutgoingHTTPAdapter(requests.adapters.HTTPAdapter):
|
|||
role: str
|
||||
timeout: int
|
||||
|
||||
def __init__(self, role: str, timeout: int, *args: Any, **kwargs: Any) -> None:
|
||||
def __init__(self, role: str, timeout: int) -> None:
|
||||
self.role = role
|
||||
self.timeout = timeout
|
||||
super().__init__(*args, **kwargs)
|
||||
super().__init__()
|
||||
|
||||
def send(self, *args: Any, **kwargs: Any) -> HTTPResponse:
|
||||
def send(self, *args: Any, **kwargs: Any) -> requests.Response:
|
||||
if kwargs.get("timeout") is None:
|
||||
kwargs["timeout"] = self.timeout
|
||||
return super().send(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue