Skip to content

Commit

Permalink
plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Sep 30, 2021
1 parent c7e0e36 commit 7c1a2d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ repos:
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 monai/utils/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def resolve_name(name):
if obj is None:
# Get all modules having the declaration/import, need to check here that getattr returns something which doesn't
# equate to False since in places __getattr__ returns 0 incorrectly:
# https://github.com/tensorflow/tensorboard/blob/a22566561d2b4fea408755a951ac9eaf3a156f8e/tensorboard/compat/tensorflow_stub/pywrap_tensorflow.py#L35
# https://github.com/tensorflow/tensorboard/blob/a22566561d2b4fea408755a951ac9eaf3a156f8e/tensorboard/compat/tensorflow_stub/pywrap_tensorflow.py#L35 # noqa: B950
mods = [m for m in list(sys.modules.values()) if getattr(m, name, None)]

if len(mods) > 0: # found modules with this declaration or import
Expand Down

0 comments on commit 7c1a2d7

Please sign in to comment.