Skip to content

Commit

Permalink
Fix enum problem
Browse files Browse the repository at this point in the history
Since python 3.11 'only-string' enums have to be called StrEnums or you
need to call `.value` on each member.
See https://docs.python.org/3/library/enum.html#enum.StrEnum for
documentation
  • Loading branch information
kdp-cloud committed Nov 8, 2024
1 parent 28168f8 commit 5cbfdc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mars-cli/mars_lib/target_repo.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from enum import Enum
from enum import StrEnum


TARGET_REPO_KEY = "target_repository"


class TargetRepository(str, Enum):
class TargetRepository(StrEnum):
"""
Holds constants, tied to the target repositories.
"""
Expand All @@ -17,4 +17,4 @@ class TargetRepository(str, Enum):

@classmethod
def available_repositories(cls):
return {item.value for item in cls}
return {item for item in cls}

0 comments on commit 5cbfdc8

Please sign in to comment.