From 7641d71a20eca6d64cd4d74da5f38fe91e2e9363 Mon Sep 17 00:00:00 2001 From: "tennessee.carmelveilleux@gmail.com" Date: Fri, 19 Jul 2024 10:16:19 -0400 Subject: [PATCH] Fix lint --- .../linux/ButtonEventsSimulator.cpp | 14 +++++++------- src/python_testing/TC_SWTCH.py | 11 ++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp b/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp index af18e233c2d55d..44bf5657f5c2f6 100644 --- a/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp +++ b/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp @@ -56,8 +56,8 @@ void EmitInitialPress(EndpointId endpointId, uint8_t newPosition) } else { - ChipLogProgress(NotSpecified, "Logged InitialPress(%" PRIu8 ") with ID %" PRIu64 " on Endpoint %" PRIu16, newPosition, - eventNumber, endpointId); + ChipLogProgress(NotSpecified, "Logged InitialPress(%u) on Endpoint %u", static_cast(newPosition), + static_cast(endpointId)); } } @@ -73,8 +73,8 @@ void EmitLongPress(EndpointId endpointId, uint8_t newPosition) } else { - ChipLogProgress(NotSpecified, "Logged LongPress(%" PRIu8 ") with ID %" PRIu64 " on Endpoint %" PRIu16, newPosition, - eventNumber, endpointId); + ChipLogProgress(NotSpecified, "Logged LongPress(%u) on Endpoint %u", static_cast(newPosition), + static_cast(endpointId)); } } @@ -91,7 +91,7 @@ void EmitLongRelease(EndpointId endpointId, uint8_t previousPosition) } else { - ChipLogProgress(NotSpecified, "Logged LongRelease with ID %" PRIu64 " on Endpoint %" PRIu16, eventNumber, endpointId); + ChipLogProgress(NotSpecified, "Logged LongRelease on Endpoint %u", static_cast(endpointId)); } } @@ -109,8 +109,8 @@ void EmitMultiPressComplete(EndpointId endpointId, uint8_t previousPosition, uin } else { - ChipLogProgress(NotSpecified, "Logged MultiPressComplete(count=%" PRIu8 ") with ID %" PRIu64 " on Endpoint %" PRIu16, count, - eventNumber, endpointId); + ChipLogProgress(NotSpecified, "Logged MultiPressComplete(count=%u) on Endpoint %u", static_cast(count), + static_cast(endpointId)); } } diff --git a/src/python_testing/TC_SWTCH.py b/src/python_testing/TC_SWTCH.py index d6644988a40d1b..7876585e6cd753 100644 --- a/src/python_testing/TC_SWTCH.py +++ b/src/python_testing/TC_SWTCH.py @@ -35,9 +35,8 @@ import chip.clusters as Clusters from chip.clusters import ClusterObjects as ClusterObjects from chip.clusters.Attribute import EventReadResult, TypedAttributePath -from chip.clusters.Types import NullValue from matter_testing_support import (AttributeValue, ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, - TestStep, async_test_body, default_matter_test_main) + async_test_body, default_matter_test_main) from mobly import asserts logger = logging.getLogger(__name__) @@ -182,8 +181,6 @@ def _expect_no_events_for_cluster(self, event_queue: queue.Queue, endpoint_id: i elapsed = 0.0 time_remaining = timeout_sec - sequence_idx = 0 - logging.info(f"Waiting {timeout_sec:.1f} seconds for no more events for cluster {expected_cluster} on endpoint {endpoint_id}") while time_remaining > 0: try: @@ -217,7 +214,7 @@ async def test_TC_SWTCH_2_4(self): has_msr_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchRelease) != 0 has_msl_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchLongPress) != 0 has_as_feature = (feature_map & cluster.Bitmaps.Feature.kActionSwitch) != 0 - has_msm_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchMultiPress) != 0 + # has_msm_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchMultiPress) != 0 if not has_ms_feature: logging.info("Skipping rest of test: SWTCH.S.F01(MS) feature not present") @@ -229,8 +226,8 @@ async def test_TC_SWTCH_2_4(self): self._placeholder_for_step("1") event_listener = EventChangeCallback(cluster) attrib_listener = ClusterAttributeChangeAccumulator(cluster) - event_sub = await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) - cluster_sub = await attrib_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) + await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) + await attrib_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) # Step 2: Operator does not operate switch on the DUT self._placeholder_for_step("2")