Skip to content

Commit

Permalink
fix: types for GCodeCommand.get_command_parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Jomik committed Nov 28, 2024
1 parent 996e9a6 commit 6845f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def cmd_SCANNER_CALIBRATE(self, gcmd: GCodeCommand):
orig_params = gcmd.get_command_parameters()
if self.calibration_method != "scan":
cmd = self.sensor_name + "_TOUCH"
params = {}
params: dict[str, str] = {}
if gcmd.get("METHOD", "None").lower() == "manual":
params["METHOD"] = "manual"
else:
Expand Down
3 changes: 3 additions & 0 deletions typings/gcode.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Callable, NamedTuple, final, overload
# Types for https://github.com/Klipper3d/klipper/blob/master/klippy/gcode.py

@final
class CommandError(Exception):
Expand All @@ -14,6 +15,8 @@ class GCodeCommand:
pass
def respond_info(self, msg: str, log: bool = True) -> None:
pass
def get_command_parameters(self) -> dict[str, str]:
pass

@overload
def get(
Expand Down

0 comments on commit 6845f92

Please sign in to comment.