lint: formatting

This commit is contained in:
Kevin Turner 2023-07-29 20:02:31 -07:00
parent dbfd1bcb5e
commit ff1c40747e

View File

@ -258,7 +258,8 @@ from .models import (
ModelConfigBase, ModelConfigBase,
ModelNotFoundException, ModelNotFoundException,
InvalidModelException, InvalidModelException,
DuplicateModelException, ModelBase, DuplicateModelException,
ModelBase,
) )
# We are only starting to number the config file with release 3. # We are only starting to number the config file with release 3.
@ -381,13 +382,7 @@ class ModelManager(object):
# causing otherwise unreferenced models to be removed from memory # causing otherwise unreferenced models to be removed from memory
self._read_models() self._read_models()
def model_exists( def model_exists(self, model_name: str, base_model: BaseModelType, model_type: ModelType, rescan=False) -> bool:
self,
model_name: str,
base_model: BaseModelType,
model_type: ModelType,
rescan = False
) -> bool:
""" """
Given a model name, returns True if it is a valid Given a model name, returns True if it is a valid
identifier. identifier.
@ -540,8 +535,9 @@ class ModelManager(object):
model_class = MODEL_CLASSES[base_model][model_type] model_class = MODEL_CLASSES[base_model][model_type]
return model_class return model_class
def _instantiate(self, model_name: str, base_model: BaseModelType, model_type: ModelType, def _instantiate(
submodel_type: SubModelType = None) -> ModelBase: self, model_name: str, base_model: BaseModelType, model_type: ModelType, submodel_type: SubModelType = None
) -> ModelBase:
model_config = self._get_model_config(base_model, model_name, model_type) model_config = self._get_model_config(base_model, model_name, model_type)
model_path, is_submodel_override = self._get_model_path(model_config, submodel_type) model_path, is_submodel_override = self._get_model_path(model_config, submodel_type)
# FIXME: do non-overriden submodels get the right class? # FIXME: do non-overriden submodels get the right class?