adapted ruff settings to better fit code base

This commit is contained in:
Matthias Mair 2024-01-07 20:01:09 +01:00
parent ad7d88a6f4
commit e1bf178b40
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
2 changed files with 7 additions and 7 deletions

View File

@ -19,8 +19,9 @@ repos:
rev: v0.1.11
hooks:
- id: ruff
args: [--fix]
args: [--fix, --preview]
- id: ruff-format
args: [--preview]
- repo: https://github.com/pycqa/isort
rev: '5.12.0'
hooks:

View File

@ -13,6 +13,7 @@ exclude = [
".env",
]
src = ["../InvenTree"]
# line-length = 120
[tool.ruff.extend-per-file-ignores]
"__init__.py" = ["D104"]
@ -35,6 +36,8 @@ ignore = [
"D202",
# - D415 - First line should end with a period, question mark, or exclamation point
"D415",
# - S101 - Use of `assert` detected
"S101"
]
[tool.ruff.lint.pydocstyle]
@ -57,15 +60,11 @@ known-first-party = ["src", "plugin", "InvenTree", "common"]
"django" = ["django"]
[tool.ruff.format]
quote-style = "single"
quote-style = "preserve"
indent-style = "space"
skip-magic-trailing-comma = false
skip-magic-trailing-comma = true
line-ending = "auto"
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
[tool.coverage.run]
source = "InvenTree"