Skip to content

Commit af5c293

Browse files
committed
fix lint errors from make lint command
1 parent d303e21 commit af5c293

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

linode_api4/objects/monitor.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,19 @@ class DashboardType(StrEnum):
115115
standard = "standard"
116116
custom = "custom"
117117

118+
118119
class AlertStatus(StrEnum):
119120
"""
120121
Enum for supported alert status values.
121122
"""
122-
123-
AlertDefinitionStatusProvisioning = "provisioning"
124-
AlertDefinitionStatusEnabling = "enabling"
125-
AlertDefinitionStatusDisabling = "disabling"
126-
AlertDefinitionStatusEnabled = "enabled"
127-
AlertDefinitionStatusDisabled = "disabled"
128-
AlertDefinitionStatusFailed = "failed"
129-
123+
124+
AlertDefinitionStatusProvisioning = "provisioning"
125+
AlertDefinitionStatusEnabling = "enabling"
126+
AlertDefinitionStatusDisabling = "disabling"
127+
AlertDefinitionStatusEnabled = "enabled"
128+
AlertDefinitionStatusDisabled = "disabled"
129+
AlertDefinitionStatusFailed = "failed"
130+
130131

131132
@dataclass
132133
class Filter(JSONObject):
@@ -386,7 +387,6 @@ class AlertType(StrEnum):
386387
user = "user"
387388

388389

389-
390390
class AlertDefinition(DerivedBase):
391391
"""
392392
Represents an alert definition for a monitor service.
@@ -446,6 +446,7 @@ class EmailDetails(JSONObject):
446446
"""
447447
Represents email-specific details for an alert channel.
448448
"""
449+
449450
usernames: Optional[List[str]] = None
450451
recipient_type: Optional[str] = None
451452

@@ -455,6 +456,7 @@ class ChannelDetails(JSONObject):
455456
"""
456457
Represents the details block for an AlertChannel, which varies by channel type.
457458
"""
459+
458460
email: Optional[EmailDetails] = None
459461

460462

@@ -467,6 +469,7 @@ class AlertInfo(JSONObject):
467469
- type: str - Type identifier (e.g., 'alerts-definitions')
468470
- alert_count: int - Number of alerts associated with this channel
469471
"""
472+
470473
url: str = ""
471474
_type: str = field(default="", metadata={"json_key": "type"})
472475
alert_count: int = 0

test/integration/models/monitor/test_monitor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ def wait_for_alert_ready(alert_id, service_type: str):
228228
interval = initial_timeout
229229
alert = client.load(AlertDefinition, alert_id, service_type)
230230
while (
231-
getattr(alert, "status", None) == AlertStatus.AlertDefinitionStatusEnabling
231+
getattr(alert, "status", None)
232+
== AlertStatus.AlertDefinitionStatusEnabling
232233
and (time.time() - start) < timeout
233234
):
234235
time.sleep(interval)

0 commit comments

Comments
 (0)