From d9dde44262c952a393663d58d7368047fb71ecd3 Mon Sep 17 00:00:00 2001 From: Georgiy Eterevskiy <goshik_e@mail.ru> Date: Tue, 6 Apr 2021 16:27:35 +0300 Subject: [PATCH] Add flake8 --- .flake8 | 6 ++++++ Makefile | 4 ++++ build-requirements.txt | 9 +++++++++ 3 files changed, 19 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..3b32ceb --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +max-line-length = 120 +inline-quotes = single +multiline-quotes = double +avoid-escape = False +exclude = .git,.tox,.env,.github,.pytest_cache,__pycache__,files,dist,build,*.egg-info,*_pb2.py,*_pb2_grpc.py \ No newline at end of file diff --git a/Makefile b/Makefile index 5647f27..bf4e2fa 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ help: @echo "clean-pyc - remove Python file artifacts" @echo "clean-test - remove test and coverage artifacts" @echo "clean-proto - remove generated gRPC code" + @echo "lint - check python code by flake8" @echo "generate - generate gRPC code" @echo "dist - package" @echo "release - package and upload a release" @@ -42,6 +43,9 @@ clean-proto: install-requirements: pip install -r build-requirements.txt +lint: install-requirements + flake8 perxis/ + generate: clean-proto install-requirements find $(PROTO_FILES_DIR) -name '*.proto' -exec python3 -m grpc_tools.protoc -I${PROTO_FILES_DIR} --python_out=$(OUTPUT_FILES_DIR) --grpc_python_out=$(OUTPUT_FILES_DIR) {} + diff --git a/build-requirements.txt b/build-requirements.txt index 7732a83..549bd38 100644 --- a/build-requirements.txt +++ b/build-requirements.txt @@ -7,18 +7,27 @@ devpi-client==5.2.2 devpi-common==3.6.0 distlib==0.3.1 filelock==3.0.12 +flake8==3.9.0 +grpcio==1.36.1 grpcio-tools==1.36.1 idna==2.10 +importlib-metadata==3.10.0 lazy==1.4 +mccabe==0.6.1 packaging==20.9 pep517==0.9.1 pkginfo==1.7.0 pluggy==0.13.1 +protobuf==3.15.7 py==1.10.0 +pycodestyle==2.7.0 +pyflakes==2.3.1 pyparsing==2.4.7 requests==2.25.1 six==1.15.0 toml==0.10.2 tox==3.23.0 +typing-extensions==3.7.4.3 urllib3==1.26.3 virtualenv==20.4.2 +zipp==3.4.1 -- GitLab