diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
commit | d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2 (patch) | |
tree | 794bc3738a00b5e599f06d1f2f6d79048d87ff8e /.flake8 | |
parent | Initial commit. (diff) | |
download | ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.tar.xz ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.zip |
Adding upstream version 6.13.1.upstream/6.13.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.flake8')
-rw-r--r-- | .flake8 | 85 |
1 files changed, 85 insertions, 0 deletions
@@ -0,0 +1,85 @@ +# spell-checker:ignore testmon tmontmp +[flake8] + +# Don't even try to analyze these: +extend-exclude = + # No need to traverse egg info dir + *.egg-info, + # GitHub configs + .github, + # Cache files of MyPy + .mypy_cache, + # Cache files of pytest + .pytest_cache, + # Temp dir of pytest-testmon + .tmontmp, + # Occasional virtualenv dir + .venv + # VS Code + .vscode, + # Temporary build dir + build, + # This contains sdists and wheels of ansible-lint that we don't want to check + dist, + # Occasional virtualenv dir + env, + # Metadata of `pip wheel` cmd is autogenerated + pip-wheel-metadata, + # vendored code + src/ansiblelint/_vendor/*, + +# Let's not over-complicate the code: +max-complexity = 10 + +# Accessibility/large fonts and PEP8 friendly: +#max-line-length = 79 +# Accessibility/large fonts and PEP8 unfriendly: +max-line-length = 100 + +# The only allowed ignores are related to black and isort +# https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length +# "H" are generated by hacking plugin, which is not black compatible +extend-ignore = + E203, + E501, + # complexity is also measured by pylint: too-many-branches + C901, + # We use type annotations instead + DAR101, + DAR104, + # https://github.com/terrencepreilly/darglint/issues/165 + DAR301, + # duplicate of pylint W0611 (unused-import) + F401, + # duplicate of pylint E0602 (undefined-variable) + F821, + # duplicate of pylint W0612 (unused-variable) + F841, + H, + +# Allow certain violations in certain files: +per-file-ignores = + # FIXME: D102 Missing docstring in public method + src/ansiblelint/cli.py: D102 + src/ansiblelint/formatters/__init__.py: D102 + src/ansiblelint/rules/*.py: D102 + src/ansiblelint/rules/__init__.py: D102 + + # FIXME: C901 Function is too complex + # FIXME: refactor _defaults_from_yamllint_config using match case + # once python 3.10 is mandatory + # Ref: https://github.com/ansible/ansible-lint/pull/2077 + src/ansiblelint/yaml_utils.py: C901 + + # FIXME: drop these once they're fixed + # Ref: https://github.com/ansible/ansible-lint/issues/725 + test/*: D102 + +# flake8-pytest-style +# PT001: +pytest-fixture-no-parentheses = true +# PT006: +pytest-parametrize-names-type = tuple +# PT007: +pytest-parametrize-values-type = tuple +pytest-parametrize-values-row-type = tuple |