Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 12, 2025
1 parent 33e9c89 commit 4e644c1
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,20 +341,18 @@ def _update_robot_synthetics(self):
for i in range(16):
# 電圧
try:
label = (getattr(self._widget, f"robot{i}_voltage"))
label = getattr(self._widget, f"robot{i}_voltage")
if self.latest_battery_voltage[i] == -1:
label.setText('-')
label.setText("-")
label.setLineWidth(0)
else:
label.setText(
"{:.2f}".format(self.latest_battery_voltage[i])
)
label.setText("{:.2f}".format(self.latest_battery_voltage[i]))
label.setLineWidth(1)
label.setFrameStyle(QFrame.Box | QFrame.Plain)
except AttributeError:
try:
label = (getattr(self._widget, f"robot{i}_voltage"))
label.setText('-')
label = getattr(self._widget, f"robot{i}_voltage")
label.setText("-")
label.setLineWidth(0)
except AttributeError:
pass
Expand All @@ -368,7 +366,7 @@ def _update_robot_synthetics(self):
label.setText("-")
label.setLineWidth(0)
for ping_status in self.ping.ping:
label = getattr(
label = getattr(
self._widget, f"robot{ping_status.robot_id}_connection_status"
)
label.setText("{:.1f}ms".format(ping_status.ping_ms))
Expand Down

0 comments on commit 4e644c1

Please sign in to comment.