Skip to content

Commit aeb485f

Browse files
Bordapre-commit-ci[bot]Copilot
authored
Replace yesqa hook from pre-commit configuration with Ruff's RUF100 (#8692)
This pull request updates the project's linting configuration by removing the standalone `yesqa` pre-commit hook and enabling the equivalent rule in `ruff`. This streamlines the code quality checks and reduces dependency complexity. Linting configuration updates: * Removed the `yesqa` hook from `.pre-commit-config.yaml`, eliminating the need for its additional dependencies and exclusions. * Enabled the `RUF100` rule in the `pyproject.toml` configuration for `ruff`, which provides the same functionality as `yesqa` for identifying unused `noqa` comments. --------- Signed-off-by: jirka <jirka.borovec@seznam.cz> Signed-off-by: Jirka Borovec <6035284+Borda@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 40df2f6 commit aeb485f

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,6 @@ repos:
3737
^monai/_version.py
3838
)
3939
40-
- repo: https://github.com/asottile/yesqa
41-
rev: v1.5.0
42-
hooks:
43-
- id: yesqa
44-
name: Unused noqa
45-
additional_dependencies:
46-
- flake8>=3.8.1
47-
- flake8-bugbear<=24.2.6
48-
- flake8-comprehensions
49-
- pep8-naming
50-
exclude: |
51-
(?x)^(
52-
monai/__init__.py|
53-
docs/source/conf.py|
54-
tests/utils.py
55-
)$
56-
5740
- repo: https://github.com/hadialqattan/pycln
5841
rev: v2.6.0
5942
hooks:

monai/apps/nnunet/nnunetv2_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from typing import Any
1919

2020
import monai
21-
from monai.apps.nnunet.utils import NNUNETMode as M # noqa: N814
21+
from monai.apps.nnunet.utils import NNUNETMode as M
2222
from monai.apps.nnunet.utils import analyze_data, create_new_data_copy, create_new_dataset_json
2323
from monai.bundle import ConfigParser
2424
from monai.utils import ensure_tuple, optional_import

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ select = [
5454
"W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w
5555
"NPY", # NumPy specific rules
5656
"UP", # pyupgrade
57-
# "RUF100", # aka yesqa
57+
"RUF100", # aka yesqa
5858
]
5959
extend-ignore = [
6060
"E741", # ambiguous variable name

0 commit comments

Comments
 (0)