Skip to content

Commit

Permalink
Fix enum str value
Browse files Browse the repository at this point in the history
  • Loading branch information
shangyian committed Dec 12, 2023
1 parent 0646436 commit e6c9fee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datajunction-query/djqs/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
class StrEnum(str, enum.Enum): # pragma: no cover
"""Backwards compatible StrEnum for Python < 3.11""" # pragma: no cover

def __str__(self):
return str(self.value)

class IntEnum(int, enum.Enum): # pragma: no cover
"""Backwards compatible IntEnum for Python < 3.11""" # pragma: no cover
3 changes: 3 additions & 0 deletions datajunction-server/datajunction_server/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
class StrEnum(str, enum.Enum): # pragma: no cover
"""Backwards compatible StrEnum for Python < 3.11""" # pragma: no cover

def __str__(self):
return str(self.value)

class IntEnum(int, enum.Enum): # pragma: no cover
"""Backwards compatible IntEnum for Python < 3.11""" # pragma: no cover

0 comments on commit e6c9fee

Please sign in to comment.