From a0112a70c5c16d8719cd362ab876bd18a8fe2227 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Mon, 3 Oct 2022 22:31:40 +0200 Subject: Update mypy to 0.981 --- src/urllib3/connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py index 172373f0..9d7a97fc 100644 --- a/src/urllib3/connection.py +++ b/src/urllib3/connection.py @@ -12,6 +12,7 @@ from typing import ( TYPE_CHECKING, Any, Callable, + ClassVar, Iterable, Mapping, NamedTuple, @@ -132,7 +133,7 @@ class HTTPConnection(_HTTPConnection): source_address: Optional[Tuple[str, int]] socket_options: Optional[connection._TYPE_SOCKET_OPTIONS] _tunnel_host: Optional[str] - _tunnel: Callable[["HTTPConnection"], None] + _tunnel: ClassVar[Callable[["HTTPConnection"], None]] _connecting_to_proxy: bool def __init__( @@ -173,7 +174,7 @@ class HTTPConnection(_HTTPConnection): # However, there is also a `host` setter so LSP is not violated. # Potentially, a `@host.deleter` might be needed depending on how this issue will be fixed. @property # type: ignore[override] - def host(self) -> str: # type: ignore[override] + def host(self) -> str: """ Getter method to remove any trailing dots that indicate the hostname is an FQDN. -- cgit v1.2.1