From 994df0b41fac2629023ff6ee9b6ee6554ff9c002 Mon Sep 17 00:00:00 2001 From: ryanpdx Date: Sat, 27 Apr 2024 15:06:49 -0700 Subject: [PATCH] lint fixes --- olaf/canopen/node.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/olaf/canopen/node.py b/olaf/canopen/node.py index d205601..25afa11 100644 --- a/olaf/canopen/node.py +++ b/olaf/canopen/node.py @@ -112,8 +112,7 @@ def _on_sync(self, cob_id: int, data: bytes, timestamp: float): # pylint: disab if self._syncs % transmission_type == 0: self.send_tpdo(i) - def _on_pdo(self, cob_id: int, data: bytes, timestamp: float): - + def _on_pdo(self, cob_id: int, data: bytes, timestamp: float): # pylint: disable=W0613 rpdo = self._rpdo_cobid_to_num[cob_id] maps = self.od[0x1600 + rpdo][0].value @@ -130,9 +129,9 @@ def _on_pdo(self, cob_id: int, data: bytes, timestamp: float): # call sdo callback(s) and convert data to bytes if isinstance(self.od[index], canopen.objectdictionary.Variable): - self._node.sdo[index].raw = data[offset: offset+size] + self._node.sdo[index].raw = data[offset : offset + size] else: # record or array - self._node.sdo[index][subindex].raw = data[offset: offset+size] + self._node.sdo[index][subindex].raw = data[offset : offset + size] offset += size