Skip to content

Commit ea6ef36

Browse files
authored
dev: sync with 0.40.1 (#24)
* update dependencies * mypy: Enum members must be left unannotated * mypy: Enum members must be left unannotated 2 * mypy: creation_tools * add missing device models * mypy: Incompatible types in assignment 2 * bump to 0.40.1dev0
1 parent 53fb8ed commit ea6ef36

File tree

7 files changed

+432
-110
lines changed

7 files changed

+432
-110
lines changed

ENDPOINTS.md

Lines changed: 68 additions & 68 deletions
Large diffs are not rendered by default.

catalystwan/utils/colors.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
class PrintColors(Enum):
7-
RED_BACKGROUND: str = "\033[41m"
8-
RED: str = "\033[31m"
9-
YELLOW: str = "\033[33m"
10-
BLUE: str = "\033[34m"
11-
GREEN: str = "\033[32m"
12-
NONE: str = "\033[0m"
7+
RED_BACKGROUND = "\033[41m"
8+
RED = "\033[31m"
9+
YELLOW = "\033[33m"
10+
BLUE = "\033[34m"
11+
GREEN = "\033[32m"
12+
NONE = "\033[0m"

catalystwan/utils/creation_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ def filter_fields(available_fields: Iterable[str], data: Dict[str, Any]) -> Dict
3737
return dict(filter(lambda key_value: key_value[0] in available_fields, data.items()))
3838

3939
data_copy = data.copy()
40-
for field in fields(cls): # type: ignore[misc]
40+
for field in fields(cls): # type: ignore[arg-type]
4141
json_field_name = field.metadata.get(FIELD_NAME, None)
4242
if json_field_name and json_field_name in data_copy:
4343
data_copy[field.name] = data_copy.pop(json_field_name)
44-
filtered_data = filter_fields(fields_dict(cls).keys(), data_copy)
44+
filtered_data = filter_fields(fields_dict(cls).keys(), data_copy) # type: ignore[arg-type]
4545
return cls(**filtered_data)
4646

4747

catalystwan/utils/dashboard.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,51 @@
1515

1616

1717
class DeviceName(Enum):
18-
VMANAGE: str = "vManage"
19-
VBOND: str = "vBond"
20-
VSMART: str = "vSmart"
21-
EDGE: str = "WAN Edge"
22-
VEDGE: str = "vEdge"
18+
VMANAGE = "vManage"
19+
VBOND = "vBond"
20+
VSMART = "vSmart"
21+
EDGE = "WAN Edge"
22+
VEDGE = "vEdge"
2323

2424

2525
class StatusName(Enum):
26-
CONTROL_STATUS: str = "Control Status"
27-
CONTROL_UP: str = "Control up"
28-
PARTIAL_CONTROL: str = "Partial"
29-
CONTROL_DOWN: str = "Control down"
26+
CONTROL_STATUS = "Control Status"
27+
CONTROL_UP = "Control up"
28+
PARTIAL_CONTROL = "Partial"
29+
CONTROL_DOWN = "Control down"
3030

3131

3232
class BfdConnectivityName(Enum):
33-
FULL: str = "Full WAN Connectivity"
34-
PARTIAL: str = "Partial WAN Connectivity"
35-
NO_CONNECTIVITY: str = "No WAN Connectivity"
33+
FULL = "Full WAN Connectivity"
34+
PARTIAL = "Partial WAN Connectivity"
35+
NO_CONNECTIVITY = "No WAN Connectivity"
3636

3737

3838
class InventoryName(Enum):
39-
TOTAL: str = "Total"
40-
AUTHORIZED: str = "Authorized"
41-
DEPLOYED: str = "Deployed"
42-
STAGING: str = "Staging"
39+
TOTAL = "Total"
40+
AUTHORIZED = "Authorized"
41+
DEPLOYED = "Deployed"
42+
STAGING = "Staging"
4343

4444

4545
class PercentageDistributionName(Enum):
46-
BELOW_10_MBPS: str = "less_than_10_mbps"
47-
BETWEEN_10_AND_100_MBPS: str = "10_mbps_100_mbps"
48-
BETWEEN_100_AND_500_MBPS: str = "100_mbps_500_mbps"
49-
ABOVE_500_MBPS: str = "greater_than_500_mbps"
46+
BELOW_10_MBPS = "less_than_10_mbps"
47+
BETWEEN_10_AND_100_MBPS = "10_mbps_100_mbps"
48+
BETWEEN_100_AND_500_MBPS = "100_mbps_500_mbps"
49+
ABOVE_500_MBPS = "greater_than_500_mbps"
5050

5151

5252
class PercentageDistribution(Enum):
53-
BELOW_10_MBPS: str = "< 10 Mbps"
54-
BETWEEN_10_AND_100_MBPS: str = "10 Mbps - 100 Mbps"
55-
BETWEEN_100_AND_500_MBPS: str = "100 Mbps - 500 Mbps"
56-
ABOVE_500_MBPS: str = "> 500 Mbps"
53+
BELOW_10_MBPS = "< 10 Mbps"
54+
BETWEEN_10_AND_100_MBPS = "10 Mbps - 100 Mbps"
55+
BETWEEN_100_AND_500_MBPS = "100 Mbps - 500 Mbps"
56+
ABOVE_500_MBPS = "> 500 Mbps"
5757

5858

5959
class HealthColor(Enum):
60-
GREEN: str = "green"
61-
YELLOW: str = "yellow"
62-
RED: str = "red"
60+
GREEN = "green"
61+
YELLOW = "yellow"
62+
RED = "red"
6363

6464

6565
def name_converter(name):

0 commit comments

Comments
 (0)