mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 02:15:52 +01:00 
			
		
		
		
	klippy: remove a few unused variable assignments (#6504)
Signed-off-by: Kamil Domański <kamil@domanski.co>
This commit is contained in:
		| @@ -191,7 +191,6 @@ class PrinterConfig: | |||||||
|     comment_r = re.compile('[#;].*$') |     comment_r = re.compile('[#;].*$') | ||||||
|     value_r = re.compile('[^A-Za-z0-9_].*$') |     value_r = re.compile('[^A-Za-z0-9_].*$') | ||||||
|     def _strip_duplicates(self, data, config): |     def _strip_duplicates(self, data, config): | ||||||
|         fileconfig = config.fileconfig |  | ||||||
|         # Comment out fields in 'data' that are defined in 'config' |         # Comment out fields in 'data' that are defined in 'config' | ||||||
|         lines = data.split('\n') |         lines = data.split('\n') | ||||||
|         section = None |         section = None | ||||||
|   | |||||||
| @@ -10,7 +10,6 @@ BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000 | |||||||
| class PrinterDotstar: | class PrinterDotstar: | ||||||
|     def __init__(self, config): |     def __init__(self, config): | ||||||
|         self.printer = printer = config.get_printer() |         self.printer = printer = config.get_printer() | ||||||
|         name = config.get_name().split()[1] |  | ||||||
|         # Configure a software spi bus |         # Configure a software spi bus | ||||||
|         ppins = printer.lookup_object('pins') |         ppins = printer.lookup_object('pins') | ||||||
|         data_pin_params = ppins.lookup_pin(config.get('data_pin')) |         data_pin_params = ppins.lookup_pin(config.get('data_pin')) | ||||||
|   | |||||||
| @@ -191,7 +191,6 @@ class EndstopPhases: | |||||||
|     def generate_stats(self, stepper_name, phase_calc): |     def generate_stats(self, stepper_name, phase_calc): | ||||||
|         phase_history = phase_calc.phase_history |         phase_history = phase_calc.phase_history | ||||||
|         wph = phase_history + phase_history |         wph = phase_history + phase_history | ||||||
|         count = sum(phase_history) |  | ||||||
|         phases = len(phase_history) |         phases = len(phase_history) | ||||||
|         half_phases = phases // 2 |         half_phases = phases // 2 | ||||||
|         res = [] |         res = [] | ||||||
|   | |||||||
| @@ -45,7 +45,7 @@ class IdleTimeout: | |||||||
|         self.state = "Printing" |         self.state = "Printing" | ||||||
|         try: |         try: | ||||||
|             script = self.idle_gcode.render() |             script = self.idle_gcode.render() | ||||||
|             res = self.gcode.run_script(script) |             self.gcode.run_script(script) | ||||||
|         except: |         except: | ||||||
|             logging.exception("idle timeout gcode execution") |             logging.exception("idle timeout gcode execution") | ||||||
|             self.state = "Ready" |             self.state = "Ready" | ||||||
|   | |||||||
| @@ -59,7 +59,6 @@ class AxisInputShaper: | |||||||
|         return self.n, self.A, self.T |         return self.n, self.A, self.T | ||||||
|     def update(self, gcmd): |     def update(self, gcmd): | ||||||
|         self.params.update(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() |         self.n, self.A, self.T = self.params.get_shaper() | ||||||
|     def set_shaper_kinematics(self, sk): |     def set_shaper_kinematics(self, sk): | ||||||
|         ffi_main, ffi_lib = chelper.get_ffi() |         ffi_main, ffi_lib = chelper.get_ffi() | ||||||
|   | |||||||
| @@ -11,7 +11,6 @@ from . import idex_modes | |||||||
| class HybridCoreXYKinematics: | class HybridCoreXYKinematics: | ||||||
|     def __init__(self, toolhead, config): |     def __init__(self, toolhead, config): | ||||||
|         self.printer = config.get_printer() |         self.printer = config.get_printer() | ||||||
|         printer_config = config.getsection('printer') |  | ||||||
|         # itersolve parameters |         # itersolve parameters | ||||||
|         self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')), |         self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')), | ||||||
|                        stepper.LookupMultiRail(config.getsection('stepper_y')), |                        stepper.LookupMultiRail(config.getsection('stepper_y')), | ||||||
|   | |||||||
| @@ -11,7 +11,6 @@ from . import idex_modes | |||||||
| class HybridCoreXZKinematics: | class HybridCoreXZKinematics: | ||||||
|     def __init__(self, toolhead, config): |     def __init__(self, toolhead, config): | ||||||
|         self.printer = config.get_printer() |         self.printer = config.get_printer() | ||||||
|         printer_config = config.getsection('printer') |  | ||||||
|         # itersolve parameters |         # itersolve parameters | ||||||
|         self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')), |         self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')), | ||||||
|                        stepper.LookupMultiRail(config.getsection('stepper_y')), |                        stepper.LookupMultiRail(config.getsection('stepper_y')), | ||||||
|   | |||||||
| @@ -655,7 +655,6 @@ class MCU: | |||||||
|         self._config_cmds.insert(0, "allocate_oids count=%d" |         self._config_cmds.insert(0, "allocate_oids count=%d" | ||||||
|                                  % (self._oid_count,)) |                                  % (self._oid_count,)) | ||||||
|         # Resolve pin names |         # Resolve pin names | ||||||
|         mcu_type = self._serial.get_msgparser().get_constant('MCU') |  | ||||||
|         ppins = self._printer.lookup_object('pins') |         ppins = self._printer.lookup_object('pins') | ||||||
|         pin_resolver = ppins.get_pin_resolver(self._name) |         pin_resolver = ppins.get_pin_resolver(self._name) | ||||||
|         for cmdlist in (self._config_cmds, self._restart_cmds, self._init_cmds): |         for cmdlist in (self._config_cmds, self._restart_cmds, self._init_cmds): | ||||||
|   | |||||||
| @@ -583,7 +583,6 @@ class ToolHead: | |||||||
|         self.step_generators.append(handler) |         self.step_generators.append(handler) | ||||||
|     def note_step_generation_scan_time(self, delay, old_delay=0.): |     def note_step_generation_scan_time(self, delay, old_delay=0.): | ||||||
|         self.flush_step_generation() |         self.flush_step_generation() | ||||||
|         cur_delay = self.kin_flush_delay |  | ||||||
|         if old_delay: |         if old_delay: | ||||||
|             self.kin_flush_times.pop(self.kin_flush_times.index(old_delay)) |             self.kin_flush_times.pop(self.kin_flush_times.index(old_delay)) | ||||||
|         if delay: |         if delay: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user