Skip to content

Commit

Permalink
chore: fix/improve flake8 configuration
Browse files Browse the repository at this point in the history
Fix & improve a bit the configuration for flake8, so it can be run
without issues:
- drop all the old ignores, no more needed (all the issues where fixed)
- drop the excludes for paths that are either do not exist anymore, or
  that it is not a problem to scan (e.g. "docs")
- add the explicit filename patterns so "*.py.in" files are scanned too;
  adding ".py" is needed since "filename" replaces the default paths
- set the same line length as used by black
- add a couple of known ignores related to the style formatted by black
- ignore longer lines in a couple of files; they are there already, and
  fixing them can be done gradually
- exclude also the default meson build directory

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
  • Loading branch information
ptoscano authored and m-horky committed Mar 13, 2024
1 parent 76f037e commit 4557f2c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
[flake8]
ignore = E501,E126,E127,E128,E722
exclude = bin,docs,include,lib,lib64,.git
filename =
*.py,
*.py.in,
# same limit as black
max-line-length = 88
ignore =
# E203 whitespace before ':'
# result of black-formatted code
E203,
# W503: line break before binary operator
W503
per-file-ignores =
# some lines are longer than 88
src/insights_client/__init__.py: E501
integration-tests/test_unregister.py: E501
extend-exclude =
# default build directory
build/,

0 comments on commit 4557f2c

Please sign in to comment.