Skip to content

Commit 66f6202

Browse files
committed
Deprecate --flake8 in favor of --ruff and update documentation
Signed-off-by: jirka <6035284+Borda@users.noreply.github.com>
1 parent 69f3b38 commit 66f6202

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Please note that, as per PyTorch, MONAI uses American English spelling. This mea
3737

3838
### Preparing pull requests
3939

40-
To ensure the code quality, MONAI relies on several linting tools ([flake8 and its plugins](https://gitlab.com/pycqa/flake8), [black](https://github.com/psf/black), [isort](https://github.com/timothycrosley/isort), [ruff](https://github.com/astral-sh/ruff)),
40+
To ensure the code quality, MONAI relies on several linting tools ([black](https://github.com/psf/black), [isort](https://github.com/timothycrosley/isort), [ruff](https://github.com/astral-sh/ruff)),
4141
static type analysis tools ([mypy](https://github.com/python/mypy), [pytype](https://github.com/google/pytype)), as well as a set of unit/integration tests.
4242

4343
This section highlights all the necessary preparation steps required before sending a pull request.
@@ -51,7 +51,7 @@ To collaborate efficiently, please read through this section and follow them.
5151

5252
#### Checking the coding style
5353

54-
Coding style is checked and enforced by flake8, black, isort, and ruff, using [a flake8 configuration](./setup.cfg) similar to [PyTorch's](https://github.com/pytorch/pytorch/blob/master/.flake8).
54+
Coding style is checked and enforced by black, isort, and ruff.
5555
Before submitting a pull request, we recommend that all linting should pass, by running the following command locally:
5656

5757
```bash

runtests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function print_usage {
8181
echo " --isort : perform \"isort\" import sort checks"
8282
echo " --pylint : perform \"pylint\" code format checks"
8383
echo " --ruff : perform \"ruff\" code format checks"
84+
echo " --flake8 : perform \"ruff\" code format checks (deprecated alias for --ruff)"
8485
echo " --clangformat : format csrc code using \"clang-format\""
8586
echo " --precommit : perform source code format check and fix using \"pre-commit\""
8687
echo ""
@@ -302,6 +303,10 @@ do
302303
--ruff)
303304
doRuffFormat=true
304305
;;
306+
--flake8)
307+
echo "${red}warning: --flake8 is deprecated, please use --ruff instead.${noColor}"
308+
doRuffFormat=true
309+
;;
305310
--precommit)
306311
doPrecommit=true
307312
;;

0 commit comments

Comments
 (0)