From 6c833dcf8c981e74d83adb6bf3580e66c3eaef96 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 14 Aug 2024 14:32:53 +0000 Subject: [PATCH] Restyled by autopep8 --- src/python_testing/TC_SWTCH.py | 3 ++- src/python_testing/matter_testing_support.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/python_testing/TC_SWTCH.py b/src/python_testing/TC_SWTCH.py index c43155c68b3519..937b658a0f9192 100644 --- a/src/python_testing/TC_SWTCH.py +++ b/src/python_testing/TC_SWTCH.py @@ -46,6 +46,7 @@ SIMULATED_LONG_PRESS_LENGTH_SECONDS = 2.0 + def bump_substep(step: str) -> str: """Given a string like "5a", bump it to "5b", or "6c" to "6d" """ if len(step) == 0: @@ -96,7 +97,7 @@ def _send_multi_press_named_pipe_command(self, endpoint_id: int, number_of_press def _send_long_press_named_pipe_command(self, endpoint_id: int, pressed_position: int, feature_map: int): command_dict = {"Name": "SimulateLongPress", "EndpointId": endpoint_id, "ButtonId": pressed_position, "LongPressDelayMillis": int(1000 * (SIMULATED_LONG_PRESS_LENGTH_SECONDS - 0.5)), - "LongPressDurationMillis": int (1000 * SIMULATED_LONG_PRESS_LENGTH_SECONDS), "FeatureMap": feature_map} + "LongPressDurationMillis": int(1000 * SIMULATED_LONG_PRESS_LENGTH_SECONDS), "FeatureMap": feature_map} self._send_named_pipe_command(command_dict) def _send_latching_switch_named_pipe_command(self, endpoint_id: int, new_position: int): diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 17a9d0b93cdcb7..76898469a1f92a 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -1808,7 +1808,8 @@ def _has_attribute(wildcard, endpoint, attribute: ClusterObjects.ClusterAttribut try: attr_list = wildcard.attributes[endpoint][cluster][cluster.Attributes.AttributeList] if not isinstance(attr_list, list): - asserts.fail(f"Failed to read mandatory AttributeList attribute value for cluster {cluster} on endpoint {endpoint}: {attr_list}.") + asserts.fail( + f"Failed to read mandatory AttributeList attribute value for cluster {cluster} on endpoint {endpoint}: {attr_list}.") return attribute.attribute_id in attr_list except KeyError: return False @@ -1842,7 +1843,8 @@ def _has_feature(wildcard, endpoint: int, cluster: ClusterObjects.ClusterObjectD try: feature_map = wildcard.attributes[endpoint][cluster][cluster.Attributes.FeatureMap] if not isinstance(feature_map, int): - asserts.fail(f"Failed to read mandatory FeatureMap attribute value for cluster {cluster} on endpoint {endpoint}: {feature_map}.") + asserts.fail( + f"Failed to read mandatory FeatureMap attribute value for cluster {cluster} on endpoint {endpoint}: {feature_map}.") return (feature & feature_map) != 0 except KeyError: