CAM: snapmaker unit tests fix type lint

NOTE get_gcode() can return an argparse.Namespace if something goes wrong with parsing the arguments.
This is contrary to the str specification.
This commit is contained in:
jalapenopuzzle
2025-04-08 10:17:19 +10:00
parent 1b4b36767d
commit b738118718

View File

@@ -17,6 +17,7 @@
# * permissions and limitations under the Licence. *
# ***************************************************************************
import re
from typing import List
import FreeCAD
@@ -63,7 +64,7 @@ class TestSnapmakerPost(PathTestUtils.PathTestBase):
"""Unit test tear down"""
pass
def get_gcode(self, ops: [str], arguments: str) -> str:
def get_gcode(self, ops: List[str], arguments: str) -> str:
"""Get postprocessed gcode from a list of operations and postprocessor arguments"""
self.profile_op.Path = Path.Path(ops)
self.job.PostProcessorArgs = "--no-show-editor --no-gui --no-thumbnail " + arguments