2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 10:35:40 +00:00

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
2 changed files with 7 additions and 7 deletions

View File

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

View File

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