]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Remove unused type checker ignores (#1038)
authorTaneli Hukkinen <hukkinj1@users.noreply.github.com>
Thu, 2 Jul 2020 15:30:15 +0000 (18:30 +0300)
committerGitHub <noreply@github.com>
Thu, 2 Jul 2020 15:30:15 +0000 (17:30 +0200)
* Remove unused type checker ignores

* Add back a type ignore required in py36

httpx/_config.py
httpx/_models.py

index 3785af9806d532340a9a39576d175296f6d5714c..96c2270211fce7d4f8945ea822deb9b21fdf309a 100644 (file)
@@ -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.
index 230ae8ffbf3c7e0da100c97627959c208363e901..67374266442c2c5adc5545108ccde597e689eca8 100644 (file)
@@ -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:
         """