get Tuple type hint syntax right

This commit is contained in:
Lincoln Stein 2023-05-13 14:59:21 -04:00
parent 5e8e3cf464
commit b23c9f1da5
2 changed files with 6 additions and 6 deletions

View File

@ -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.
"""

View File

@ -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.