From 2ea1004a9897c6e6a576caf20b3b73e06a9ac9e8 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Tue, 31 Dec 2019 00:29:02 +0100 Subject: [PATCH] Unify flake8 config, remove unused imports --- .flake8 | 4 ++++ conftest.py | 2 +- graphql/execution/executors/asyncio_utils.py | 3 +-- setup.cfg | 4 ---- tox.ini | 5 ----- 5 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..0e81bd9e --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +ignore = E203,E501,W503,W504 +exclude = .git,.mypy_cache,.pytest_cache,.tox,.venv,__pycache__,build,dist,docs +max-line-length = 88 diff --git a/conftest.py b/conftest.py index 6b916378..b1db4820 100644 --- a/conftest.py +++ b/conftest.py @@ -3,7 +3,7 @@ import pytest try: - import pyannotate_runtime + import pyannotate_runtime # noqa: F401 PYANOTATE_PRESENT = True except ImportError: diff --git a/graphql/execution/executors/asyncio_utils.py b/graphql/execution/executors/asyncio_utils.py index 17ec5c79..9c8f88da 100644 --- a/graphql/execution/executors/asyncio_utils.py +++ b/graphql/execution/executors/asyncio_utils.py @@ -1,5 +1,4 @@ -from inspect import isasyncgen # type: ignore -from asyncio import ensure_future, wait, CancelledError +from asyncio import ensure_future, CancelledError from rx import AnonymousObservable diff --git a/setup.cfg b/setup.cfg index a65570f3..6c4eac13 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,3 @@ -[flake8] -exclude = tests,scripts,setup.py,docs,graphql/execution/executors/asyncio_utils.py,conftest.py -max-line-length = 160 - [coverage:run] omit=graphql/backend/quiver_cloud.py,tests,*/tests/* diff --git a/tox.ini b/tox.ini index 6b3cb9d4..bd990c33 100644 --- a/tox.ini +++ b/tox.ini @@ -28,8 +28,3 @@ commands = changedir = docs deps = sphinx commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html - -[flake8] -# Must match black formatter default line length -max-line-length = 88 -ignore = E203,E501,W503,W504