Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
outgoing_http: Fix type annotations.
Anders Kaseorg7f0381d4c7f1
diff --git a/pyproject.toml b/pyproject.tomlindex 628a0dbea66..3b34dec8ae6 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -100,7 +100,6 @@ module = ["tornado.*","twitter.*","two_factor.*",- "urllib3.*","zxcvbn.*",]ignore_missing_imports = truediff --git a/zerver/lib/outgoing_http.py b/zerver/lib/outgoing_http.pyindex d0fc93dae3f..dbeed927741 100644--- a/zerver/lib/outgoing_http.py+++ b/zerver/lib/outgoing_http.py@@ -1,7 +1,6 @@from typing import Any, Dict, Optionalimport requests-from urllib3 import HTTPResponseclass OutgoingSession(requests.Session):@@ -18,12 +17,12 @@ class OutgoingHTTPAdapter(requests.adapters.HTTPAdapter):role: strtimeout: int- def __init__(self, role: str, timeout: int, *args: Any, **kwargs: Any) -> None:+ def __init__(self, role: str, timeout: int) -> None:self.role = roleself.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.timeoutreturn super().send(*args, **kwargs)