diff --git a/.pylint-rcfile b/.pylint-rcfile index 8cc4c8d8..d32d90c4 100644 --- a/.pylint-rcfile +++ b/.pylint-rcfile @@ -43,3 +43,5 @@ good-names=i,j,k,ex,Run,f,fp # Maximum number of nested blocks for function / method body max-nested-blocks=5 +[FORMAT] +max-line-length=88 diff --git a/.vscode/settings.json b/.vscode/settings.json index 6d3b59a0..da31cd7f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,20 +1,19 @@ { "python.formatting.blackArgs": [ - "--config pyproject.toml" + "--config=pyproject.toml" ], "python.formatting.provider": "black", "python.linting.banditEnabled": true, "python.linting.banditArgs": [ - "-r", "-ii", - "--ini .bandit", + "--ini=.bandit", ], "python.linting.enabled": true, "python.linting.mypyArgs": [ - "--config-file mypy.ini" + "--config-file=mypy.ini" ], "python.linting.mypyEnabled": true, - "python.linting.pycodestyleEnabled": true, + "python.linting.flake8Enabled": true, "python.linting.pylintArgs": [ "--rcfile=.pylint-rcfile" ], diff --git a/hooks/pre-commit b/hooks/pre-commit index dfd608f9..4acfe2b5 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -55,13 +55,16 @@ fi # We ignore the following PEP8 warnings # * E123: closing bracket does not match indentation of opening bracket's line # - Broken if multiple indentation levels start on a single line +# * E203: whitespace before ':' +# - E203 is not PEP 8 compliant and conflict with black # * E501: line too long (82 > 79 characters) # - Recommended for readability but not enforced # - Some lines are awkward to wrap around a char limit # * W503: line break before binary operator # - Quite pedantic -PEP8_IGNORE="E123,E501,W503" + +PEP8_IGNORE="E123,E203,E501,W503" err() { echo >&2 ERROR: "$@" diff --git a/setup.cfg b/setup.cfg index 81bcf8af..67e7581d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,3 +39,11 @@ output_dir = locale [compile_catalog] domain = fdroidserver directory = locale + +[pycodestyle] +ignore = E203,W503 +max-line-length = 88 + +[flake8] +ignore = E203,W503 +max-line-length = 88