Skip to content

Commit

Permalink
fixed C0209 (consider-using-f-string)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chr157i4n committed Nov 7, 2023
1 parent 3f4b028 commit 8655f8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/TMC_2209/TMC_2209_StepperDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def set_motor_enabled(self, en):
enables or disables the motor current output
"""
GPIO.output(self._pin_en, not en)
self.log("Motor output active: {}".format(en), Loglevel.INFO.value)
self.log("Motor output active: {en}", Loglevel.INFO.value)



Expand Down
6 changes: 3 additions & 3 deletions src/TMC_2209/TMC_2209_uart.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def read_reg(self, register):

rtn = self.ser.write(self.r_frame)
if rtn != len(self.r_frame):
print("TMC2209: Err in write {}".format(__), file=sys.stderr)
print("TMC2209: Err in write")
return False

# adjust per baud and hardware. Sequential reads without some delay fail.
Expand Down Expand Up @@ -178,7 +178,7 @@ def write_reg(self, register, val):

rtn = self.ser.write(self.w_frame)
if rtn != len(self.w_frame):
print("TMC2209: Err in write {}".format(__), file=sys.stderr)
print("TMC2209: Err in write")
return False

time.sleep(self.communication_pause)
Expand Down Expand Up @@ -280,7 +280,7 @@ def test_uart(self, register):

rtn = self.ser.write(self.r_frame)
if rtn != len(self.r_frame):
print("TMC2209: Err in write {}".format(__), file=sys.stderr)
print("TMC2209: Err in write")
return False

# adjust per baud and hardware. Sequential reads without some delay fail.
Expand Down

0 comments on commit 8655f8a

Please sign in to comment.