Skip to content

Commit

Permalink
Fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zultron committed Nov 17, 2023
1 parent 87d5ddd commit 9cbee40
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hw_device_mgr/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def write(self):
"""Write `command_out` to hardware interface."""

def __str__(self):
return f"{self.name}@{str(self.address).replace(' ','')}"
return f"{self.name}@{str(self.address).replace(' ', '')}"

def __repr__(self):
return f"<{self.__str__()}>"
Expand Down
2 changes: 1 addition & 1 deletion hw_device_mgr/devices/elmo_gold.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def set_params_volatile(self, nv=False):
# Params have to be explicitly saved
if nv:
for i, char in enumerate("save"):
self.config.download(f"1010-0{i+1}h", ord(char))
self.config.download(f"1010-0{i + 1}h", ord(char))


# FIXME These models differ only by revision, but the CiA 301 class
Expand Down
2 changes: 1 addition & 1 deletion hw_device_mgr/latency/ecat_pcap_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, x, base=10, *, pdo, length):
self.length = length

def __str__(self):
return f"0x{{:0{int(self.length)*2}X}}".format(self)
return f"0x{{:0{int(self.length) * 2}X}}".format(self)

def __repr__(self):
return f"<PDO {self.pdo}={str(self)}>"
Expand Down
4 changes: 2 additions & 2 deletions hw_device_mgr/tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,12 @@ def check_data_values(
# Print debug info
if actual_val is MISSING:
msg = "MISSING" if missing_not_ok else "(missing; ok)"
print(f'{" "*indent}{prefix}{param}: {msg}')
print(f'{" " * indent}{prefix}{param}: {msg}')
elif isinstance(expected_val, dict):
if actual_val:
self.print_dict(actual_val, prefix + param, indent=indent)
else:
print(f'{" "*indent}{prefix}{param}: {{}}')
print(f'{" " * indent}{prefix}{param}: {{}}')
else:
self.print_dict(actual_val, param, indent=indent, prefix=prefix)
# Check param actual vs expected
Expand Down

0 comments on commit 9cbee40

Please sign in to comment.