From 9389607aaf66bf8cd34db25084b6920b51af450d Mon Sep 17 00:00:00 2001 From: sshakndr Date: Tue, 21 Nov 2023 15:39:31 +0700 Subject: [PATCH] python: flake8 configuration file --- .github/workflows/lint-python.yml | 3 +-- web/documentserver-example/python/.flake8 | 4 ++++ web/documentserver-example/python/Makefile | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 web/documentserver-example/python/.flake8 diff --git a/.github/workflows/lint-python.yml b/.github/workflows/lint-python.yml index 756d0e89..936407a3 100644 --- a/.github/workflows/lint-python.yml +++ b/.github/workflows/lint-python.yml @@ -31,5 +31,4 @@ jobs: - name: Lint Flake8 run: | - flake8 --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 --count --max-complexity=15 --max-line-length=120 --per-file-ignores="__init__.py:F4" --statistics + flake8 --count --show-source --statistics diff --git a/web/documentserver-example/python/.flake8 b/web/documentserver-example/python/.flake8 new file mode 100644 index 00000000..39193f07 --- /dev/null +++ b/web/documentserver-example/python/.flake8 @@ -0,0 +1,4 @@ +[flake8] +max-complexity = 15 +max-line-length = 120 +per-file-ignores = __init__.py:F4 \ No newline at end of file diff --git a/web/documentserver-example/python/Makefile b/web/documentserver-example/python/Makefile index 03a9c75d..21a227f0 100644 --- a/web/documentserver-example/python/Makefile +++ b/web/documentserver-example/python/Makefile @@ -47,8 +47,7 @@ compose-prod: # Up containers in a production environment. .PHONY: lint lint: # Lint the source code for style and check for types. - @flake8 - @mypy . + @flake8 --count --show-source --statistics .PHONY: test test: # Recursively run the tests.