2024-01-07 16:29:21 +00:00
|
|
|
|
|
|
|
[tool.ruff]
|
2024-01-07 17:19:02 +00:00
|
|
|
exclude = [
|
|
|
|
".git",
|
|
|
|
"__pycache__",
|
|
|
|
"dist",
|
|
|
|
"build",
|
|
|
|
"test.py",
|
|
|
|
"tests",
|
|
|
|
"venv",
|
|
|
|
"env",
|
|
|
|
".venv",
|
|
|
|
".env",
|
|
|
|
]
|
|
|
|
src = ["../InvenTree"]
|
2024-01-07 16:29:21 +00:00
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2024-01-07 17:19:02 +00:00
|
|
|
select = ["A", "B", "C4", "D", "DJ", "N", "S"]
|
|
|
|
# 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",
|
|
|
|
]
|
2024-01-07 16:29:21 +00:00
|
|
|
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
|
|
|
convention = "google"
|
|
|
|
|
|
|
|
[tool.ruff.lint.isort]
|
2024-01-07 17:19:02 +00:00
|
|
|
split-on-trailing-comma = false
|
|
|
|
combine-as-imports = false
|
|
|
|
section-order = [
|
|
|
|
"future",
|
|
|
|
"standard-library",
|
|
|
|
"django",
|
|
|
|
"third-party",
|
|
|
|
"first-party",
|
|
|
|
"local-folder",
|
|
|
|
]
|
2024-01-07 16:29:21 +00:00
|
|
|
known-first-party = ["src", "plugin", "InvenTree", "common"]
|
|
|
|
|
|
|
|
[tool.ruff.lint.isort.sections]
|
|
|
|
"django" = ["django"]
|
2024-01-07 17:19:02 +00:00
|
|
|
|
|
|
|
[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"]
|