From 3d2b1e1449b4b61783c1ec761134259db0fbc572 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Sun, 22 Jun 2025 12:20:38 +0200 Subject: [PATCH] Configure black/ruff exclusions in tool sections instead of in command lines --- pyproject.toml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8ce6dd63..a708b561 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"