Skip to content

Commit 9fe869f

Browse files
committed
Clean up no-untyped-def #825
Change-Id: I6b4e5ce6e1a1863e7948f7705d1d52720593a1fe
1 parent 348b060 commit 9fe869f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

cmk/plugins/collection/agent_based/sap_hana_data_volume.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
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"
7-
86
from collections.abc import Mapping, Sequence
97
from contextlib import suppress
108
from typing import Any
@@ -87,10 +85,14 @@ def check_sap_hana_data_volume(
8785
yield Result(state=State.OK, summary="Path: %s" % path)
8886

8987

90-
def cluster_check_sap_hana_data_volume(item, params, section):
88+
def cluster_check_sap_hana_data_volume(
89+
item: str,
90+
params: Mapping[str, Any],
91+
section: Mapping[str, sap_hana.ParsedSection | None],
92+
) -> CheckResult:
9193
yield Result(state=State.OK, summary="Nodes: %s" % ", ".join(section.keys()))
9294
for node_section in section.values():
93-
if item in node_section:
95+
if node_section is not None and item in node_section:
9496
yield from check_sap_hana_data_volume(item, params, node_section)
9597
return
9698

0 commit comments

Comments
 (0)