Skip to content

Commit f8d8e93

Browse files
committed
Clean up no-untyped-def #874
Change-Id: Ia5c3f57340f0af7fd864e21bb3d7754e2e321734
1 parent 2fa8737 commit f8d8e93

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

cmk/legacy_checks/netextreme_psu.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
44
# conditions defined in the file COPYING, which is part of this source code package.
55

6-
# mypy: disable-error-code="no-untyped-def"
76

7+
from collections.abc import Iterable
8+
from typing import Any
89

910
from cmk.agent_based.legacy.v0_unstable import LegacyCheckDefinition
10-
from cmk.agent_based.v2 import SNMPTree
11+
from cmk.agent_based.v2 import SNMPTree, StringTable
1112
from cmk.legacy_includes.elphase import check_elphase
1213
from cmk.plugins.netextreme.lib import DETECT_NETEXTREME
1314

@@ -20,14 +21,16 @@
2021
# as in the documentation 'Summit-X460-G2-DS.pdf'
2122

2223

23-
def parse_netextreme_psu(string_table):
24+
def parse_netextreme_psu(string_table: StringTable) -> dict[str, dict[str, float]]:
2425
try:
2526
return {"1": {"power": float(string_table[0][0]) * pow(10, int(string_table[0][1]))}}
2627
except (IndexError, ValueError):
2728
return {}
2829

2930

30-
def discover_netextreme_psu(section):
31+
def discover_netextreme_psu(
32+
section: dict[str, dict[str, float]],
33+
) -> Iterable[tuple[str, dict[str, Any]]]:
3134
yield from ((item, {}) for item in section)
3235

3336

0 commit comments

Comments
 (0)