aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--klippy/gcode.py2
-rw-r--r--klippy/msgproto.py2
-rw-r--r--klippy/stepper.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index c6f7248b..8e1dca2b 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -40,7 +40,7 @@ class GCodeParser:
handlers = [h for h in handlers
if getattr(self, 'cmd_'+h+'_when_not_ready', False)]
gcode_handlers = { h: getattr(self, 'cmd_'+h) for h in handlers }
- for h, f in gcode_handlers.items():
+ for h, f in list(gcode_handlers.items()):
aliases = getattr(self, 'cmd_'+h+'_aliases', [])
gcode_handlers.update({ a: f for a in aliases })
return gcode_handlers
diff --git a/klippy/msgproto.py b/klippy/msgproto.py
index 24f577f4..df7b6717 100644
--- a/klippy/msgproto.py
+++ b/klippy/msgproto.py
@@ -252,7 +252,7 @@ class MessageParser:
def _parse_buffer(self, value):
tval = int(value, 16)
out = []
- for i in range(len(value)/2):
+ for i in range(len(value) // 2):
out.append(tval & 0xff)
tval >>= 8
out.reverse()
diff --git a/klippy/stepper.py b/klippy/stepper.py
index a2fda545..eac1d263 100644
--- a/klippy/stepper.py
+++ b/klippy/stepper.py
@@ -36,7 +36,7 @@ class PrinterStepper:
else:
self.homing_endstop_accuracy = int(math.ceil(
endstop_accuracy * self.inv_step_dist))
- if self.homing_endstop_accuracy >= self.homing_stepper_phases/2:
+ if self.homing_endstop_accuracy >= self.homing_stepper_phases // 2:
logging.info("Endstop for %s is not accurate enough for stepper"
" phase adjustment" % (name,))
self.homing_stepper_phases = None