Skip to content

Commit

Permalink
chore: own config file for flake8 (#608)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck authored Oct 25, 2023
1 parent 1942e09 commit 2bc7cb1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ trim_trailing_whitespace = false
indent_style = space
indent_size = 4

[*.ini]
[{*.ini,.bandit,.flake8}]
charset = latin1
indent_style = space
indent_size = 4
20 changes: 20 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[flake8]
## https://flake8.pycqa.org/en/latest/user/configuration.html
## keep in sync with isort config - in `.isort.cfg` file

exclude =
build,dist,__pycache__,.eggs,*.egg-info*,
*_cache,*.cache,
.git,.tox,.venv,venv
_OLD,_TEST,
docs

max-line-length = 120

#max-complexity = 10

ignore =
# ignore `self`, `cls` markers of flake8-annotations>=2.0
ANN101,ANN102
# ignore ANN401 for dynamically typed *args and **kwargs
ANN401
5 changes: 4 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[settings]
## read the docs: https://pycqa.github.io/isort/docs/configuration/options.html
## keep in sync with flake8 config - in `tox.ini` file
## keep in sync with flake8 config - in `.flake8` file
known_first_party = cyclonedx_py
skip_gitignore = true
skip_glob =
Expand All @@ -15,3 +15,6 @@ ensure_newline_before_comments = true
include_trailing_comma = true
line_length = 120
multi_line_output = 3
src_paths =
cyclonedx_py
tests
16 changes: 0 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,3 @@ commands =
skip_install = True
commands =
poetry run flake8 cyclonedx_py/ tests/

[flake8]
## keep in sync with isort config - in `isort.cfg` file
exclude =
build,dist,__pycache__,.eggs,*.egg-info*,
*_cache,*.cache,
.git,.tox,.venv,venv
_OLD,_TEST,
docs
max-line-length = 120
ignore =
E305
# ignore `self`, `cls` markers of flake8-annotations>=2.0
ANN101,ANN102
# ignore ANN401 for dynamically typed *args and **kwargs
ANN401

0 comments on commit 2bc7cb1

Please sign in to comment.