diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2022-11-08 21:52:24 +0330 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-08 12:22:24 -0600 |
| commit | b48d3d6e8544037f854f62be1e3f3415614e93a4 (patch) | |
| tree | e792e409ee343cba619cf8eff8ff5445c5edcb0c /src | |
| parent | dda8edfafe7d6b908877fb00c0022a47d6d1f209 (diff) | |
| download | urllib3-b48d3d6e8544037f854f62be1e3f3415614e93a4.tar.gz | |
Update mypy to 0.990
Diffstat (limited to 'src')
| -rw-r--r-- | src/urllib3/connection.py | 2 | ||||
| -rw-r--r-- | src/urllib3/connectionpool.py | 2 | ||||
| -rw-r--r-- | src/urllib3/util/ssl_.py | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py index 9e90ffe1..1362bd08 100644 --- a/src/urllib3/connection.py +++ b/src/urllib3/connection.py @@ -189,7 +189,7 @@ class HTTPConnection(_HTTPConnection): # If `host` is made a property it violates LSP, because a writeable attribute is overridden with a read-only one. # 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] + @property def host(self) -> str: """ Getter method to remove any trailing dots that indicate the hostname is an FQDN. diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py index 65be538c..33310dcf 100644 --- a/src/urllib3/connectionpool.py +++ b/src/urllib3/connectionpool.py @@ -1065,7 +1065,7 @@ class HTTPSConnectionPool(HTTPConnectionPool): self.port or "443", ) - if not self.ConnectionCls or self.ConnectionCls is DummyConnection: # type: ignore[comparison-overlap] + if not self.ConnectionCls or self.ConnectionCls is DummyConnection: # type: ignore[comparison-overlap, truthy-function] raise ImportError( "Can't connect to HTTPS URL because the SSL module is not available." ) diff --git a/src/urllib3/util/ssl_.py b/src/urllib3/util/ssl_.py index 1be94cf0..dbb2e8de 100644 --- a/src/urllib3/util/ssl_.py +++ b/src/urllib3/util/ssl_.py @@ -99,7 +99,7 @@ _SSL_VERSION_TO_TLS_VERSION: Dict[int, int] = {} try: # Do we have ssl at all? import ssl - from ssl import ( # type: ignore[misc] + from ssl import ( # type: ignore[assignment] CERT_REQUIRED, HAS_NEVER_CHECK_COMMON_NAME, OP_NO_COMPRESSION, @@ -136,7 +136,7 @@ try: # Do we have ssl at all? except AttributeError: # Defensive: continue - from .ssltransport import SSLTransport # type: ignore[misc] + from .ssltransport import SSLTransport # type: ignore[assignment] except ImportError: OP_NO_COMPRESSION = 0x20000 # type: ignore[assignment] OP_NO_TICKET = 0x4000 # type: ignore[assignment] |
