From 5a24dc55d86e4c5ca7fe0bd496da768caf617591 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Wed, 1 Feb 2023 16:50:54 +0330 Subject: Update pre-commit repos --- src/urllib3/_collections.py | 1 - src/urllib3/connection.py | 2 -- src/urllib3/connectionpool.py | 2 -- src/urllib3/poolmanager.py | 1 - src/urllib3/response.py | 1 - src/urllib3/util/ssltransport.py | 1 - 6 files changed, 8 deletions(-) (limited to 'src') diff --git a/src/urllib3/_collections.py b/src/urllib3/_collections.py index ec81768c..3e43afbc 100644 --- a/src/urllib3/_collections.py +++ b/src/urllib3/_collections.py @@ -6,7 +6,6 @@ from enum import Enum, auto from threading import RLock if typing.TYPE_CHECKING: - # We can only import Protocol if TYPE_CHECKING because it's a development # dependency, and is not available at runtime. from typing_extensions import Protocol diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py index 2873251d..1f13af0b 100644 --- a/src/urllib3/connection.py +++ b/src/urllib3/connection.py @@ -321,7 +321,6 @@ class HTTPConnection(_HTTPConnection): decode_content: bool = True, enforce_content_length: bool = True, ) -> None: - # Update the inner socket's timeout value to send the request. # This only triggers if the connection is re-used. if self.sock is not None: @@ -526,7 +525,6 @@ class HTTPSConnection(HTTPConnection): key_file: str | None = None, key_password: str | None = None, ) -> None: - super().__init__( host, port=port, diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py index 7dfb846e..2479405b 100644 --- a/src/urllib3/connectionpool.py +++ b/src/urllib3/connectionpool.py @@ -316,7 +316,6 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods): # self.pool is None. pass except queue.Full: - # Connection never got put back into the pool, close it. if conn: conn.close() @@ -1001,7 +1000,6 @@ class HTTPSConnectionPool(HTTPConnectionPool): ca_cert_dir: str | None = None, **conn_kw: typing.Any, ) -> None: - super().__init__( host, port, diff --git a/src/urllib3/poolmanager.py b/src/urllib3/poolmanager.py index 538bed3c..b8434a32 100644 --- a/src/urllib3/poolmanager.py +++ b/src/urllib3/poolmanager.py @@ -543,7 +543,6 @@ class ProxyManager(PoolManager): proxy_assert_fingerprint: str | None = None, **connection_pool_kw: typing.Any, ) -> None: - if isinstance(proxy_url, HTTPConnectionPool): str_proxy_url = f"{proxy_url.scheme}://{proxy_url.host}:{proxy_url.port}" else: diff --git a/src/urllib3/response.py b/src/urllib3/response.py index d21ad4fd..69e1bd66 100644 --- a/src/urllib3/response.py +++ b/src/urllib3/response.py @@ -106,7 +106,6 @@ class DeflateDecoder(ContentDecoder): class GzipDecoderState: - FIRST_MEMBER = 0 OTHER_MEMBERS = 1 SWALLOW_DATA = 2 diff --git a/src/urllib3/util/ssltransport.py b/src/urllib3/util/ssltransport.py index 5f5fcf68..5ec86473 100644 --- a/src/urllib3/util/ssltransport.py +++ b/src/urllib3/util/ssltransport.py @@ -8,7 +8,6 @@ import typing from ..exceptions import ProxySchemeUnsupported if typing.TYPE_CHECKING: - from typing_extensions import Literal from .ssl_ import _TYPE_PEER_CERT_RET, _TYPE_PEER_CERT_RET_DICT -- cgit v1.2.1