Skip to content

Commit aec0264

Browse files
author
Artem
committed
docs: add docstring to _safe_parse_status
1 parent 99f528b commit aec0264

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

elementary/monitor/api/alerts/alert_filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def _get_alert_node_name(alert: PendingAlertSchema) -> Optional[str]:
3838

3939

4040
def _safe_parse_status(raw_status: Optional[str]) -> Optional[Status]:
41+
"""Parse a raw alert status into a Status enum, or None if it isn't recognized."""
4142
try:
4243
return Status(raw_status)
4344
except ValueError:

0 commit comments

Comments
 (0)