Add flake8-comprehensions to nox check task (#200)

* fixed as flake8-comprehensions

* added site folder into gitignore
This commit is contained in:
Can Sarıgöl 2019-08-13 17:22:18 +03:00 committed by Seth Michael Larson
parent 80dc3e274e
commit 1b82d6373b
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
.mypy_cache/
__pycache__/
htmlcov/
site/
*.egg-info/
venv/
.nox

View 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(

View 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(