Skip to content

Commit 965f1d6

Browse files
committed
resolved comments from copilot commented whereever not applicable
1 parent 8b58eb6 commit 965f1d6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

linode_api4/objects/monitor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import dataclass, field
2-
from typing import List, Optional, Union
2+
from typing import Any, List, Optional, Union
33

44
from linode_api4.objects import DerivedBase
55
from linode_api4.objects.base import Base, Property
@@ -245,7 +245,7 @@ class DimensionFilter(JSONObject):
245245
dimension_label: str = ""
246246
label: str = ""
247247
operator: str = ""
248-
value: str = None
248+
value: Optional[str] = None
249249

250250

251251
@dataclass
@@ -351,7 +351,7 @@ class AlertDefinition(DerivedBase):
351351
"updated": Property(is_datetime=True),
352352
"updated_by": Property(),
353353
"created_by": Property(),
354-
"entity_ids": Property(List[str]),
354+
"entity_ids": Property(List[Any]),
355355
"description": Property(mutable=True),
356356
"_class": Property("class"),
357357
}

test/fixtures/monitor_services_dbaas_alert-definitions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"type": "user",
99
"description": "A test alert for dbaas service",
1010
"entity_ids": [
11-
13217
11+
"13217"
1212
],
1313
"alert_channels": [],
1414
"has_more_resources": false,

test/fixtures/monitor_services_dbaas_alert-definitions_12345.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"id": 12345,
33
"label": "Test Alert for DBAAS",
44
"service_type": "dbaas",
5-
"severity": "warning",
5+
"severity": 1,
66
"type": "user",
77
"description": "A test alert for dbaas service",
88
"entity_ids": [
9-
13217
9+
"13217"
1010
],
1111
"alert_channels": [],
1212
"has_more_resources": false,

test/unit/groups/monitor_api_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_create_alert_definition(self):
8888
"id": 67890,
8989
"label": "Created Alert",
9090
"service_type": service_type,
91-
"severity": "warning",
91+
"severity": 1,
9292
"status": "active",
9393
}
9494

0 commit comments

Comments
 (0)