diff --git a/.gitlab-ci/.flake8 b/.gitlab-ci/.flake8 new file mode 100644 index 00000000000..95db896bc0b --- /dev/null +++ b/.gitlab-ci/.flake8 @@ -0,0 +1,33 @@ +[flake8] +exclude = .venv*, + +# PEP 8 Style Guide limits line length to 79 characters +max-line-length = 167 + +ignore = + # continuation line under-indented for hanging indent + E121 + # continuation line over-indented for hanging indent + E126, + # continuation line under-indented for visual indent + E128, + # whitespace before ':' + E203, + # missing whitespace around arithmetic operator + E226, + # missing whitespace after ',' + E231, + # expected 2 blank lines, found 1 + E302, + # too many blank lines + E303, + # imported but unused + F401, + # f-string is missing placeholders + F541, + # local variable assigned to but never used + F841, + # line break before binary operator + W503, + # line break after binary operator + W504, diff --git a/.gitlab-ci/run-pytest.sh b/.gitlab-ci/run-pytest.sh index 2225be59fec..91898ef948b 100755 --- a/.gitlab-ci/run-pytest.sh +++ b/.gitlab-ci/run-pytest.sh @@ -54,3 +54,9 @@ PYTHONPATH="${LIB_TEST_DIR}:${SCRIPT_TEST_DIR}:${PYTHONPATH:-}" python3 -m \ ${PYTEST_VERBOSE:-} section_end pytest + +section_start flake8 "flake8" +flake8 \ +--config "${CI_PROJECT_DIR}/.gitlab-ci/.flake8" \ +"${LIB_TEST_DIR}" "${SCRIPT_TEST_DIR}" +section_end flake8 diff --git a/bin/ci/requirements.txt b/bin/ci/requirements.txt index 81be9147bd4..40f4c5dd8a7 100644 --- a/bin/ci/requirements.txt +++ b/bin/ci/requirements.txt @@ -1,8 +1,12 @@ +# If you change these requirements, and you need these packages +# to be available in the debian/x86_64_pyutils container +# then bump the DEBIAN_PYUTILS_TAG PyYAML==6.* colorama==0.4.* filecache==0.81 filelock==3.* fire==0.5.0 +flake8==7.* gql==3.* kaleido==0.2.* lavacli==1.5.2