Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion monai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 16 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down