Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: own config file for flake8 #608

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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