Skip to content

Commit

Permalink
[fbsync] fix mypy (#7685)
Browse files Browse the repository at this point in the history
Reviewed By: vmoens

Differential Revision: D47186587

fbshipit-source-id: a77c300da806c98f5a6679b97cc462f5be218997
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Jul 3, 2023
1 parent 7e988b5 commit 285971d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torchvision/models/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def get_weight(name: str) -> WeightsEnum:
base_module_name = ".".join(sys.modules[__name__].__name__.split(".")[:-1])
base_module = importlib.import_module(base_module_name)
model_modules = [base_module] + [
x[1] for x in inspect.getmembers(base_module, inspect.ismodule) if x[1].__file__.endswith("__init__.py")
x[1]
for x in inspect.getmembers(base_module, inspect.ismodule)
if x[1].__file__.endswith("__init__.py") # type: ignore[union-attr]
]

weights_enum = None
Expand Down

0 comments on commit 285971d

Please sign in to comment.