Skip to content

Commit a4b9285

Browse files
committed
Fix mytype complaint
Signed-off-by: M Q <mingmelvinq@nvidia.com>
1 parent 3e12c85 commit a4b9285

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

monai/deploy/core/app_context.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
from os.path import abspath
1313
from typing import Dict, Optional
1414

15-
from .models.model import Model, ModelFactory
15+
from .models.factory import ModelFactory
16+
from .models.model import Model
1617
from .runtime_env import RuntimeEnv
1718

1819

@@ -46,9 +47,7 @@ def update(self, args: Dict[str, str]):
4647
self._model_loaded = False # path changed, reset the flag to re-load
4748

4849
if not self._model_loaded:
49-
self.models: Model = (
50-
ModelFactory.create(abspath(self.model_path)) if not self._model_loaded else self.models
51-
)
50+
self.models = ModelFactory.create(abspath(self.model_path)) if not self._model_loaded else self.models
5251
self._model_loaded = True
5352

5453
def __repr__(self):

0 commit comments

Comments
 (0)