diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 7d23ccc..b27f75f 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -2,6 +2,7 @@ name: Check workflow running linter, unit and functional tests on: workflow_call: + workflow_dispatch: pull_request: types: [opened, synchronize, reopened] branches: [master, main] diff --git a/prometheus_hardware_exporter/collector.py b/prometheus_hardware_exporter/collector.py index aa669ff..6d9edfb 100644 --- a/prometheus_hardware_exporter/collector.py +++ b/prometheus_hardware_exporter/collector.py @@ -1018,9 +1018,9 @@ def fetch(self) -> List[Payload]: chassis_data: Dict[str, Dict] = redfish_helper.get_chassis_data() storage_drive_count, storage_drive_data = redfish_helper.get_storage_drive_data() memory_dimm_count, memory_dimm_data = redfish_helper.get_memory_dimm_data() - smart_storage_health_data: Dict[ - str, Any - ] = redfish_helper.get_smart_storage_health_data() + smart_storage_health_data: Dict[str, Any] = ( + redfish_helper.get_smart_storage_health_data() + ) except ( ConnectionError, diff --git a/prometheus_hardware_exporter/collectors/dmidecode.py b/prometheus_hardware_exporter/collectors/dmidecode.py index c01e33a..b167431 100644 --- a/prometheus_hardware_exporter/collectors/dmidecode.py +++ b/prometheus_hardware_exporter/collectors/dmidecode.py @@ -1,4 +1,5 @@ """Dmidecode metrics collector.""" + import re from functools import lru_cache from logging import getLogger diff --git a/prometheus_hardware_exporter/collectors/perccli.py b/prometheus_hardware_exporter/collectors/perccli.py index 43faf4b..72bb1e8 100644 --- a/prometheus_hardware_exporter/collectors/perccli.py +++ b/prometheus_hardware_exporter/collectors/perccli.py @@ -1,4 +1,5 @@ """Collector for PowerEdgeRAID controller.""" + from logging import getLogger from typing import Any, Dict, List, Union diff --git a/prometheus_hardware_exporter/collectors/redfish.py b/prometheus_hardware_exporter/collectors/redfish.py index 16146d0..b15f0b2 100644 --- a/prometheus_hardware_exporter/collectors/redfish.py +++ b/prometheus_hardware_exporter/collectors/redfish.py @@ -1,4 +1,5 @@ """Redfish collector.""" + from logging import getLogger from typing import Any, Callable, Dict, List, Optional, Tuple diff --git a/tests/unit/test_collector.py b/tests/unit/test_collector.py index 5435fc7..50daadf 100644 --- a/tests/unit/test_collector.py +++ b/tests/unit/test_collector.py @@ -396,9 +396,9 @@ def test_ipmi_sel_installed_and_okay(self): payloads_labels_value_map = {} for payload in payloads: if payload.name == "ipmi_sel_state": - payloads_labels_value_map[ - tuple(payload.samples[0].labels.values()) - ] = payload.samples[0].value + payloads_labels_value_map[tuple(payload.samples[0].labels.values())] = ( + payload.samples[0].value + ) expected_payloads_label_value_map = { ("System Board ACPI_Stat", "System ACPI Power State"): 1, ("System Chassis SysHealth_Stat", "Chassis"): 2,