Skip to content
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

remove redundant noqa #3027

Merged
merged 6 commits into from
Oct 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -34,11 +34,18 @@ repos:
monai/_version.py
)$

#- repo: https://github.com/asottile/yesqa
# rev: v1.2.3
# hooks:
# - id: yesqa
# name: Unused noqa
- repo: https://github.com/asottile/yesqa
rev: v1.2.3
hooks:
- id: yesqa
name: Unused noqa
additional_dependencies:
- flake8>=3.8.1
- flake8-bugbear
- flake8-comprehensions
- flake8-executable
- flake8-pyi
- pep8-naming

#- repo: https://github.com/PyCQA/isort
# rev: 5.9.3
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
print(sys.path)

import monai # noqa: E402
import monai

# -- Project information -----------------------------------------------------
project = "MONAI"
2 changes: 1 addition & 1 deletion monai/__init__.py
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@
),
)

from .utils.module import load_submodules # noqa: E402
from .utils.module import load_submodules

# handlers_* have some external decorators the users may not have installed
# *.so files and folder "_C" may not exist when the cpp extensions are not compiled
19 changes: 16 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -83,9 +83,22 @@ max_line_length = 120
# C408 ignored because we like the dict keyword argument syntax
# E501 is not flexible enough, we're using B950 instead
ignore =
E203,E305,E402,E501,E721,E741,F821,F841,F999,W503,W504,C408,E302,W291,E303,
# N812 lowercase 'torch.nn.functional' imported as non lowercase 'F'
N812
E203
E305
E402
E501
E721
E741
F821
F841
F999
W503
W504
C408
E302
W291
E303
N812 # lowercase 'torch.nn.functional' imported as non lowercase 'F'
per_file_ignores = __init__.py: F401
exclude = *.pyi,.git,.eggs,monai/_version.py,versioneer.py,venv,.venv,_version.py