mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
move config section
This commit is contained in:
parent
8569233181
commit
42a41d23af
@ -1,18 +1,70 @@
|
|||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
exclude=[".git","__pycache__","dist","build","test.py","tests", "venv","env",".venv",".env"]
|
exclude = [
|
||||||
|
".git",
|
||||||
|
"__pycache__",
|
||||||
|
"dist",
|
||||||
|
"build",
|
||||||
|
"test.py",
|
||||||
|
"tests",
|
||||||
|
"venv",
|
||||||
|
"env",
|
||||||
|
".venv",
|
||||||
|
".env",
|
||||||
|
]
|
||||||
|
src = ["../InvenTree"]
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["A", "B", "C4", "D", "DJ", "LOG", "N", "I","S"]
|
select = ["A", "B", "C4", "D", "DJ", "N", "S"]
|
||||||
ignore = ["N999", ]
|
# Things that should be enabled in the future:
|
||||||
|
# - LOG
|
||||||
|
# - I
|
||||||
|
|
||||||
|
ignore = [
|
||||||
|
"N999",
|
||||||
|
# - N802 - function name should be lowercase
|
||||||
|
"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",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.ruff.lint.pydocstyle]
|
[tool.ruff.lint.pydocstyle]
|
||||||
convention = "google"
|
convention = "google"
|
||||||
|
|
||||||
[tool.ruff.lint.isort]
|
[tool.ruff.lint.isort]
|
||||||
combine-as-imports = true
|
split-on-trailing-comma = false
|
||||||
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder" ]
|
combine-as-imports = false
|
||||||
|
section-order = [
|
||||||
|
"future",
|
||||||
|
"standard-library",
|
||||||
|
"django",
|
||||||
|
"third-party",
|
||||||
|
"first-party",
|
||||||
|
"local-folder",
|
||||||
|
]
|
||||||
known-first-party = ["src", "plugin", "InvenTree", "common"]
|
known-first-party = ["src", "plugin", "InvenTree", "common"]
|
||||||
|
|
||||||
[tool.ruff.lint.isort.sections]
|
[tool.ruff.lint.isort.sections]
|
||||||
"django" = ["django"]
|
"django" = ["django"]
|
||||||
|
|
||||||
|
[tool.ruff.format]
|
||||||
|
quote-style = "double"
|
||||||
|
indent-style = "space"
|
||||||
|
skip-magic-trailing-comma = false
|
||||||
|
line-ending = "auto"
|
||||||
|
|
||||||
|
[tool.ruff.flake8-quotes]
|
||||||
|
docstring-quotes = "double"
|
||||||
|
inline-quotes = "double"
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
source = "InvenTree"
|
||||||
|
|
||||||
|
[tool.ruff.extend-per-file-ignores]
|
||||||
|
"__init__.py" = ["D104"]
|
||||||
|
20
setup.cfg
20
setup.cfg
@ -8,29 +8,9 @@ ignore =
|
|||||||
E722,
|
E722,
|
||||||
# - C901 - function is too complex
|
# - C901 - function is too complex
|
||||||
C901,
|
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 - Do not call getattr with a constant attribute value
|
||||||
B009
|
B009
|
||||||
exclude = .git,__pycache__,*/migrations/*,*/lib/*,*/bin/*,*/media/*,*/static/*,InvenTree/plugins/*
|
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
|
|
||||||
ban-relative-imports = parents
|
|
||||||
|
|
||||||
[coverage:run]
|
|
||||||
source = ./InvenTree
|
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
src_paths=InvenTree
|
src_paths=InvenTree
|
||||||
|
Loading…
Reference in New Issue
Block a user