InvenTree/setup.cfg
Matthias Mair f38386b13c
Add more checks to pre-commit (#3132)
* Add bandit to pre-commit checks

* fix catchall exceptions

* remove unused definitons

* remove unuseed ariables

* Add docstring

* fix B006, B008 errors

* fix B007 error

* ignore B009

* Add checks for formatting and naming
2022-06-06 08:56:52 +10:00

39 lines
1.0 KiB
INI

[flake8]
ignore =
# - W605 - invalid escape sequence
W605,
# - E501 - line too long (82 characters)
E501,
# - E722 - do not use bare except
E722,
# - C901 - function is too complex
C901,
# - N802 - function name should be lowercase
# TODO (In the future, we should conform to this!)
N802,
# - N806 - variable should be lowercase
N806,
# - N812 - lowercase imported as non-lowercase
N812,
# - D202 - No blank lines allowed after function docstring
D202,
# - D415 - First line should end with a period, question mark, or exclamation point
D415,
# - B009 - Do not call getattr with a constant attribute value
B009
exclude = .git,__pycache__,*/migrations/*,*/lib/*,*/bin/*,*/media/*,*/static/*,InvenTree/plugins/*
per-file-ignores =
# Do not enforce docstring on __init__
__init__.py: D104
max-complexity = 20
docstring-convention=google
[coverage:run]
source = ./InvenTree
[isort]
src_paths=InvenTree
skip_glob =*/migrations/*.py
known_django=django
sections=FUTURE, STDLIB, DJANGO, THIRDPARTY, FIRSTPARTY, LOCALFOLDER