From b23c9f1da5f19167669ac044179884092187253a Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sat, 13 May 2023 14:59:21 -0400 Subject: [PATCH] get Tuple type hint syntax right --- invokeai/app/services/model_manager_service.py | 8 ++++---- invokeai/backend/model_management/model_manager.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/invokeai/app/services/model_manager_service.py b/invokeai/app/services/model_manager_service.py index 8384a97435..5c57c5462c 100644 --- a/invokeai/app/services/model_manager_service.py +++ b/invokeai/app/services/model_manager_service.py @@ -67,7 +67,7 @@ class ModelManagerServiceBase(ABC): pass @abstractmethod - def default_model(self) -> Union[Tuple(str, SDModelType),None]: + def default_model(self) -> Union[Tuple[str, SDModelType],None]: """ Returns the name and typeof the default model, or None if none is defined. @@ -87,7 +87,7 @@ class ModelManagerServiceBase(ABC): pass @abstractmethod - def model_names(self)->List[Tuple(str, SDModelType)]: + def model_names(self)->List[Tuple[str, SDModelType]]: """ Returns a list of all the model names known. """ @@ -352,7 +352,7 @@ class ModelManagerService(ModelManagerServiceBase): model_name, model_type) - def default_model(self) -> Union[Tuple(str, SDModelType),None]: + def default_model(self) -> Union[Tuple[str, SDModelType],None]: """ Returns the name of the default model, or None if none is defined. @@ -369,7 +369,7 @@ class ModelManagerService(ModelManagerServiceBase): """ return self.mgr.model_info(model_name) - def model_names(self)->List[Tuple(str, SDModelType)]: + def model_names(self)->List[Tuple[str, SDModelType]]: """ Returns a list of all the model names known. """ diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index 301f29f2c9..f1a6dc18dc 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -377,7 +377,7 @@ class ModelManager(object): _cache = self.cache ) - def default_model(self) -> Union[Tuple(str, SDModelType),None]: + def default_model(self) -> Union[Tuple[str, SDModelType],None]: """ Returns the name of the default model, or None if none is defined. @@ -413,7 +413,7 @@ class ModelManager(object): return None return self.config[self.create_key(model_name,model_type)] - def model_names(self) -> List[Tuple(str, SDModelType)]: + def model_names(self) -> List[Tuple[str, SDModelType]]: """ Return a list of (str, SDModelType) corresponding to all models known to the configuration.