Skip to content

Commit

Permalink
refactor: simplify ModelName class (#264)
Browse files Browse the repository at this point in the history
This commit simplifies the ModelName class list method.
  • Loading branch information
rickstaa authored Nov 6, 2024
1 parent 9f18001 commit a1f8638
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runner/app/pipelines/image_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ModelName(Enum):
@classmethod
def list(cls):
"""Return a list of all model IDs."""
return list(map(lambda c: c.value, cls))
return [model.value for model in cls]


class ImageToImagePipeline(Pipeline):
Expand Down
2 changes: 1 addition & 1 deletion runner/app/pipelines/text_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ModelName(Enum):
@classmethod
def list(cls):
"""Return a list of all model IDs."""
return list(map(lambda c: c.value, cls))
return [model.value for model in cls]


class TextToImagePipeline(Pipeline):
Expand Down

0 comments on commit a1f8638

Please sign in to comment.