diff --git a/klippy/configfile.py b/klippy/configfile.py index f099b563406d..2185f60680a3 100644 --- a/klippy/configfile.py +++ b/klippy/configfile.py @@ -189,7 +189,6 @@ def _find_autosave_data(self, data): comment_r = re.compile('[#;].*$') value_r = re.compile('[^A-Za-z0-9_].*$') def _strip_duplicates(self, data, config): - fileconfig = config.fileconfig # Comment out fields in 'data' that are defined in 'config' lines = data.split('\n') section = None diff --git a/klippy/extras/dotstar.py b/klippy/extras/dotstar.py index d75f438a795c..4186534fead6 100644 --- a/klippy/extras/dotstar.py +++ b/klippy/extras/dotstar.py @@ -10,7 +10,6 @@ class PrinterDotstar: def __init__(self, config): self.printer = printer = config.get_printer() - name = config.get_name().split()[1] # Configure a software spi bus ppins = printer.lookup_object('pins') data_pin_params = ppins.lookup_pin(config.get('data_pin')) diff --git a/klippy/extras/endstop_phase.py b/klippy/extras/endstop_phase.py index feb9e8b8b082..2c7468bce3e0 100644 --- a/klippy/extras/endstop_phase.py +++ b/klippy/extras/endstop_phase.py @@ -191,7 +191,6 @@ def cmd_ENDSTOP_PHASE_CALIBRATE(self, gcmd): def generate_stats(self, stepper_name, phase_calc): phase_history = phase_calc.phase_history wph = phase_history + phase_history - count = sum(phase_history) phases = len(phase_history) half_phases = phases // 2 res = [] diff --git a/klippy/extras/idle_timeout.py b/klippy/extras/idle_timeout.py index 479c0b5c7999..6ab2a34a533a 100644 --- a/klippy/extras/idle_timeout.py +++ b/klippy/extras/idle_timeout.py @@ -45,7 +45,7 @@ def transition_idle_state(self, eventtime): self.state = "Printing" try: script = self.idle_gcode.render() - res = self.gcode.run_script(script) + self.gcode.run_script(script) except: logging.exception("idle timeout gcode execution") self.state = "Ready" diff --git a/klippy/extras/input_shaper.py b/klippy/extras/input_shaper.py index 7f37d302bd46..a628289ef2d0 100644 --- a/klippy/extras/input_shaper.py +++ b/klippy/extras/input_shaper.py @@ -59,7 +59,6 @@ def get_shaper(self): return self.n, self.A, self.T def update(self, gcmd): self.params.update(gcmd) - old_n, old_A, old_T = self.n, self.A, self.T self.n, self.A, self.T = self.params.get_shaper() def set_shaper_kinematics(self, sk): ffi_main, ffi_lib = chelper.get_ffi() diff --git a/klippy/kinematics/hybrid_corexy.py b/klippy/kinematics/hybrid_corexy.py index 26032039c016..1c2164eb745a 100644 --- a/klippy/kinematics/hybrid_corexy.py +++ b/klippy/kinematics/hybrid_corexy.py @@ -11,7 +11,6 @@ class HybridCoreXYKinematics: def __init__(self, toolhead, config): self.printer = config.get_printer() - printer_config = config.getsection('printer') # itersolve parameters self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')), stepper.LookupMultiRail(config.getsection('stepper_y')), diff --git a/klippy/kinematics/hybrid_corexz.py b/klippy/kinematics/hybrid_corexz.py index e13c9aa4cb4a..0eaea117ed2a 100644 --- a/klippy/kinematics/hybrid_corexz.py +++ b/klippy/kinematics/hybrid_corexz.py @@ -11,7 +11,6 @@ class HybridCoreXZKinematics: def __init__(self, toolhead, config): self.printer = config.get_printer() - printer_config = config.getsection('printer') # itersolve parameters self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')), stepper.LookupMultiRail(config.getsection('stepper_y')), diff --git a/klippy/mcu.py b/klippy/mcu.py index f9b547c94479..11dd84dd5988 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -654,7 +654,6 @@ def _send_config(self, prev_crc): self._config_cmds.insert(0, "allocate_oids count=%d" % (self._oid_count,)) # Resolve pin names - mcu_type = self._serial.get_msgparser().get_constant('MCU') ppins = self._printer.lookup_object('pins') pin_resolver = ppins.get_pin_resolver(self._name) for cmdlist in (self._config_cmds, self._restart_cmds, self._init_cmds): diff --git a/klippy/toolhead.py b/klippy/toolhead.py index ce014365c6f9..83240acbb5e6 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -575,7 +575,6 @@ def register_step_generator(self, handler): self.step_generators.append(handler) def note_step_generation_scan_time(self, delay, old_delay=0.): self.flush_step_generation() - cur_delay = self.kin_flush_delay if old_delay: self.kin_flush_times.pop(self.kin_flush_times.index(old_delay)) if delay: