Skip to content

Commit

Permalink
Reduce line length to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson committed Nov 8, 2022
1 parent cc781d2 commit 8159e2c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/controller/python/chip/yaml/YamlParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup)
response_type = stringcase.pascalcase(self._request_object.response_type)
expected_command = data_model_lookup.get_command(self._cluster, response_type)
expected_response_args = self._expected_raw_response['values']
expected_response_data_as_dict = YamlUtils.convert_name_value_pair_to_dict(expected_response_args)
expected_response_data = YamlUtils.convert_yaml_type(expected_response_data_as_dict, expected_command)
expected_response_data_as_dict = YamlUtils.convert_name_value_pair_to_dict(
expected_response_args)
expected_response_data = YamlUtils.convert_yaml_type(
expected_response_data_as_dict, expected_command)
self._expected_response_object = expected_command.FromDict(expected_response_data)

def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int):
Expand Down Expand Up @@ -258,7 +260,8 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup)

def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int):
try:
resp = asyncio.run(dev_ctrl.WriteAttribute(node_id, [(endpoint, self._request_object)]))
resp = asyncio.run(
dev_ctrl.WriteAttribute(node_id, [(endpoint, self._request_object)]))
except chip.interaction_model.InteractionModelError:
if (self.expected_raw_response is not None and
self.expected_raw_response.get('error')):
Expand Down

0 comments on commit 8159e2c

Please sign in to comment.