Skip to content

Commit

Permalink
refactor: use official backport
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Apr 10, 2024
1 parent eadaea5 commit 9519b30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"eth-pydantic-types", # Use same version as eth-ape
"pydantic_settings", # Use same version as eth-ape
"taskiq[metrics]>=0.10.4,<0.11.0",
"backports.strenum ; python_version<'3.11'",
],
entry_points={
"console_scripts": ["silverback=silverback._cli:cli"],
Expand Down
6 changes: 1 addition & 5 deletions silverback/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
from enum import StrEnum # Only Python 3.11+

except ImportError:
from enum import Enum

class StrEnum(str, Enum): # type: ignore[no-redef]
def __str__(self) -> str:
return self.value
from backports.strenum import StrEnum # type: ignore[no-redef]


class TaskType(StrEnum):
Expand Down

0 comments on commit 9519b30

Please sign in to comment.