]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Add flake8-comprehensions to nox check task (#200)
authorCan Sarıgöl <cansarigol@derinbilgi.com.tr>
Tue, 13 Aug 2019 14:22:18 +0000 (17:22 +0300)
committerSeth Michael Larson <sethmichaellarson@gmail.com>
Tue, 13 Aug 2019 14:22:18 +0000 (09:22 -0500)
* fixed as flake8-comprehensions

* added site folder into gitignore

.gitignore
httpx/client.py
noxfile.py

index 90690006b3d230e8e8031b636681899923be60d1..fcadefce3eace1c5436c31b702e16a824fd956c7 100644 (file)
@@ -4,6 +4,7 @@
 .mypy_cache/
 __pycache__/
 htmlcov/
+site/
 *.egg-info/
 venv/
 .nox
index 6b49797e4af909a7d231334b16f301ad9f301304..9d704b33e95d9b915103f519326e13039129b8f7 100644 (file)
@@ -207,7 +207,7 @@ class BaseClient:
             # will raise redirect errors if appropriate.
             if len(history) > self.max_redirects:
                 raise TooManyRedirects(response=history[-1])
-            if request.url in [response.url for response in history]:
+            if request.url in (response.url for response in history):
                 raise RedirectLoop(response=history[-1])
 
             response = await self.dispatch.send(
index a63d620c5932325b9ec6fe4e101ba820d79b4616..d7246a902fffedb3097860678d0ff6865c73b2da 100644 (file)
@@ -28,7 +28,9 @@ def lint(session):
 
 @nox.session(reuse_venv=True)
 def check(session):
-    session.install("black", "flake8", "flake8-bugbear", "mypy")
+    session.install(
+        "black", "flake8", "flake8-bugbear", "flake8-comprehensions", "mypy"
+    )
 
     session.run("black", "--check", "--target-version=py36", *source_files)
     session.run(