diff --git a/pyproject.toml b/pyproject.toml index 628a0dbea6..3b34dec8ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,7 +100,6 @@ module = [ "tornado.*", "twitter.*", "two_factor.*", - "urllib3.*", "zxcvbn.*", ] ignore_missing_imports = true diff --git a/zerver/lib/outgoing_http.py b/zerver/lib/outgoing_http.py index d0fc93dae3..dbeed92774 100644 --- a/zerver/lib/outgoing_http.py +++ b/zerver/lib/outgoing_http.py @@ -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)