From ecdb976c412bb0fa9b65f90e410ab54308dad874 Mon Sep 17 00:00:00 2001 From: Vadym Melnychuk Date: Tue, 11 Jul 2023 18:47:01 +0300 Subject: [PATCH] cleanup --- pyhon/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyhon/commands.py b/pyhon/commands.py index 2132705..dcc3192 100644 --- a/pyhon/commands.py +++ b/pyhon/commands.py @@ -82,7 +82,7 @@ class HonCommand: for name, parameter in self._parameters.items(): if parameter.mandatory: result.setdefault(parameter.group, {})[name] = parameter.intern_value - return result + return result @property def parameter_value(self) -> Dict[str, Union[str, float]]: @@ -120,7 +120,8 @@ class HonCommand: self._parameters[name] = HonParameterProgram(name, self, "custom") async def send(self, onlyMandatory: bool = False) -> bool: - grouped_params = self.mandatory_parameter_groups if onlyMandatory else self.parameter_groups + grouped_params = self.mandatory_parameter_groups \ + if onlyMandatory else self.parameter_groups params = grouped_params.get("parameters", {}) ancillary_params = self.parameter_groups.get("ancillaryParameters", {}) ancillary_params.pop("programRules", None)