Skip to content

Commit

Permalink
fix: enum definition
Browse files Browse the repository at this point in the history
the enum definition didn't inherit from str and was thus not being
recongised as a default value for the cli tool
  • Loading branch information
devraj committed Jul 29, 2024
1 parent da52f9a commit e9607c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions gallagher/cli/alarms.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ async def comment(
"[magenta] Commenting on alarm ...",
) as status:
try:

console.log("Finding alarm ...")
alarm_detail = await Alarms.retrieve(id)

Expand Down Expand Up @@ -171,7 +170,6 @@ async def acknowledge(

for id in ids:
try:

# Get the alarm
console.log("Finding alarm ...")
alarm_detail = await Alarms.retrieve(id)
Expand Down Expand Up @@ -220,7 +218,6 @@ async def acknowledge(
"[magenta] Attempting to view alarm ...",
) as status:
try:

# Get the alarm
console.log("Finding alarm ...")
alarm_detail = await Alarms.retrieve(id)
Expand Down Expand Up @@ -287,8 +284,8 @@ async def process(
) as status:

for id in ids:
try:

try:
# Get the alarm
console.log("Finding alarm ...")
alarm_detail = await Alarms.retrieve(id)
Expand Down
2 changes: 1 addition & 1 deletion gallagher/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from enum import Enum


class SearchSortOrder(Enum):
class SearchSortOrder(str, Enum):
"""Sort descriptors for search operations.
If an endpoint needs to customise the sort order,
Expand Down

0 comments on commit e9607c1

Please sign in to comment.