Commit 5a51a44
committed
Invoke ruff through PY_EXE and drop its duplicated excludes
runtests.sh called ruff as a bare executable on PATH while isort, black,
pylint and pytype all go through "${PY_EXE}" -m. The guard above it,
is_pip_installed ruff, tests importlib.util.find_spec using PY_EXE, so
the check interrogated one environment and the invocation ran whatever
ruff PATH happened to offer. In a clean virtualenv built per
CONTRIBUTING.md this makes ./runtests.sh --codeformat fail outright:
ruff
./runtests.sh: line 598: ruff: command not found
Check failed!
and where a system ruff does exist it silently wins over the pinned one.
The --exclude versioneer.py --exclude monai/_version.py flags are
dropped because [tool.ruff] extend-exclude now carries them, so they
apply however ruff is reached rather than only through this script.
--unsafe-fixes is left on the fix path as-is; making it symmetric with
the check path is a behaviour change and belongs on its own.
Signed-off-by: Hans Johnson <hans-johnson@uiowa.edu>1 parent 2aa2d14 commit 5a51a44
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| |||
0 commit comments