diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2021-04-01 22:09:02 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-04-01 22:18:39 -0500 |
commit | 8244ddf7bdd76888484859fcdf9a38b0f1d96ad9 (patch) | |
tree | 2d52bbb3434a5278fe98d63a5ac9649102c6f7ea | |
parent | a099d60f5b8a78d3783d4e12036eae8e287b2c42 (diff) | |
download | requests-cache-8244ddf7bdd76888484859fcdf9a38b0f1d96ad9.tar.gz |
Fix remaining linting issues, and add flake8 to 'analyze' job in GitHub Actions
-rw-r--r-- | .github/workflows/build.yml | 10 | ||||
-rw-r--r-- | examples/basic_usage.py | 1 | ||||
-rw-r--r-- | examples/session_patch.py | 1 | ||||
-rw-r--r-- | setup.cfg | 1 | ||||
-rw-r--r-- | setup.py | 2 |
5 files changed, 11 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f86b63f..45b06d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,10 +87,12 @@ jobs: - name: Install dependencies run: pip install ".[dev]" - - name: Run black check - run: black --check --diff . - - name: Run isort check - run: isort --check --diff . + - name: Run linter + run: flake8 . + - name: Run code style checks + run: | + black --check --diff . + isort --check --diff . - name: Run cyclomatic complexity check run: radon cc --show-complexity --average --order SCORE requests_cache diff --git a/examples/basic_usage.py b/examples/basic_usage.py index 3888681..5234e43 100644 --- a/examples/basic_usage.py +++ b/examples/basic_usage.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# flake8: noqa: F841 """A Simple example using requests-cache with httpbin""" import time diff --git a/examples/session_patch.py b/examples/session_patch.py index 8ae900b..f84e72e 100644 --- a/examples/session_patch.py +++ b/examples/session_patch.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# flake8: noqa: F841 """The same as `basic_usage.py`, but using global session patching""" import time @@ -24,6 +24,7 @@ classifiers = [flake8] max_line_length = 120 +select = E,F,W,C4,C90 exclude = __pycache__,.tox,build,dist,test,venv # Defer these rules to black: ignore = @@ -22,6 +22,8 @@ extras_require = { 'test': [ 'black==20.8b1', 'flake8', + 'flake8-comprehensions', + 'flake8-polyfill', 'isort', 'pre-commit', 'psutil', |