Configure black/ruff exclusions in tool sections instead of in command lines

This commit is contained in:
Dominik Jain committed 2025-06-22 12:20:38 +02:00
1 parent 8a1b8606c7
commit 3d2b1e1449
1 file changed
+14 -4
+14 -4
View File
@@ -80,6 +80,12 @@ line-length = 140
target-version = [
"py311"
]
exclude = '''
/(
src/multilspy
| src/solidlsp
)/
'''
[tool.doc8]
max-line-length = 1000
@@ -112,10 +118,10 @@ PYDEVD_DISABLE_FILE_VALIDATION = "1"
# For custom markers, one can either adjust the env var or just use -m option in the command line,
# as the second -m option will override the first one.
test = "pytest test -vv -m \"${PYTEST_MARKERS:-not java and not rust and not isolated_process}\""
_black_check = "black --check --exclude src/multilspy/ --exclude src/solidlsp/ src scripts test"
_ruff_check = "ruff check --exclude .venv/ --exclude src/multilspy/ --exclude src/solidlsp/ src scripts test"
_black_format = "black --exclude .venv/|src/multilspy/|src/solidlsp/ src scripts test"
_ruff_format = "ruff check --exclude src/multilspy/ --exclude src/solidlsp/ --fix src scripts test"
_black_check = "black --check src scripts test"
_ruff_check = "ruff check src scripts test"
_black_format = "black src scripts test"
_ruff_format = "ruff check --fix src scripts test"
lint = [
"_black_check",
"_ruff_check",
@@ -132,6 +138,10 @@ type-check = [
[tool.ruff]
target-version = "py311"
line-length = 140
exclude = [
"src/multilspy",
"src/solidlsp"
]
[tool.ruff.format]
quote-style = "double"