-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Replace yesqa hook from pre-commit configuration with Ruff's RUF100 #8692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,7 +18,7 @@ | |||||
| from typing import Any | ||||||
|
|
||||||
| import monai | ||||||
| from monai.apps.nnunet.utils import NNUNETMode as M # noqa: N814 | ||||||
| from monai.apps.nnunet.utils import NNUNETMode as M | ||||||
| from monai.apps.nnunet.utils import analyze_data, create_new_data_copy, create_new_dataset_json | ||||||
| from monai.bundle import ConfigParser | ||||||
| from monai.utils import ensure_tuple, optional_import | ||||||
|
|
@@ -34,7 +34,7 @@ | |||||
| __all__ = ["nnUNetV2Runner"] | ||||||
|
|
||||||
|
|
||||||
| class nnUNetV2Runner: # noqa: N801 | ||||||
| class nnUNetV2Runner: | ||||||
|
||||||
| class nnUNetV2Runner: | |
| class nnUNetV2Runner: # noqa: N801 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -337,7 +337,7 @@ def profile_iter(self, name, iterable): | |||||
|
|
||||||
| class _Iterable: | ||||||
|
|
||||||
| def __iter__(_self): # noqa: B902, N805 pylint: disable=E0213 | ||||||
| def __iter__(_self): | ||||||
|
||||||
| def __iter__(_self): | |
| def __iter__(self): |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,14 +32,14 @@ def __init__(self, *args, **kwargs): | |||||
| super().__init__(*args, **kwargs) | ||||||
| self.timed_tests = {} | ||||||
|
|
||||||
| def startTest(self, test): # noqa: N802 | ||||||
| def startTest(self, test): | ||||||
|
||||||
| def startTest(self, test): | |
| def startTest(self, test): # noqa: N802 |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the noqa: N802 comment will cause flake8 violations. The project still uses flake8 with pep8-naming plugin (configured in setup.cfg). The method name stopTest violates N802 (function name should be lowercase) but must use this name to override the parent class method from unittest.TextTestResult. Since Ruff doesn't have the "N" rule category enabled, RUF100 won't detect this, but flake8 will still flag it.
| def stopTest(self, test): | |
| def stopTest(self, test): # noqa: N802 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the
noqa: N814comment will cause flake8 violations. The project still uses flake8 with pep8-naming plugin (configured in setup.cfg with "N" rules selected). ImportingNNUNETMode as Mviolates N814 (camelcase imported as uppercase). Since Ruff doesn't have the "N" rule category enabled, RUF100 won't detect this, but flake8 will still flag it when run via runtests.sh --flake8.