From: Taneli Hukkinen Date: Thu, 2 Jul 2020 15:30:15 +0000 (+0300) Subject: Remove unused type checker ignores (#1038) X-Git-Tag: 0.14.0~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c53172d716a6f2b5d3a5d79187d33da2232def25;p=thirdparty%2Fhttpx.git Remove unused type checker ignores (#1038) * Remove unused type checker ignores * Add back a type ignore required in py36 --- diff --git a/httpx/_config.py b/httpx/_config.py index 3785af98..96c22702 100644 --- a/httpx/_config.py +++ b/httpx/_config.py @@ -102,7 +102,7 @@ class SSLConfig: if self.trust_env and self.verify is True: ca_bundle = get_ca_bundle_from_env() if ca_bundle is not None: - self.verify = ca_bundle # type: ignore + self.verify = ca_bundle if isinstance(self.verify, ssl.SSLContext): # Allow passing in our own SSLContext object that's pre-configured. diff --git a/httpx/_models.py b/httpx/_models.py index 230ae8ff..67374266 100644 --- a/httpx/_models.py +++ b/httpx/_models.py @@ -320,7 +320,7 @@ class QueryParams(typing.Mapping[str, str]): return self._dict[key] return default - def update(self, params: QueryParamTypes = None) -> None: # type: ignore + def update(self, params: QueryParamTypes = None) -> None: if not params: return @@ -1098,7 +1098,7 @@ class Cookies(MutableMapping): value = None for cookie in self.jar: if cookie.name == name: - if domain is None or cookie.domain == domain: # type: ignore + if domain is None or cookie.domain == domain: if path is None or cookie.path == path: if value is not None: message = f"Multiple cookies exist with name={name}" @@ -1120,12 +1120,12 @@ class Cookies(MutableMapping): remove = [] for cookie in self.jar: if cookie.name == name: - if domain is None or cookie.domain == domain: # type: ignore + if domain is None or cookie.domain == domain: if path is None or cookie.path == path: remove.append(cookie) for cookie in remove: - self.jar.clear(cookie.domain, cookie.path, cookie.name) # type: ignore + self.jar.clear(cookie.domain, cookie.path, cookie.name) def clear(self, domain: str = None, path: str = None) -> None: """