From 63813f7fa6674a1cdb9d5c797ea56ac72bb31bae Mon Sep 17 00:00:00 2001 From: Torgny Bjers Date: Sat, 6 Jun 2026 20:36:26 -0400 Subject: [PATCH 1/3] Apply suggested fix to tests/test_shaker.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tests/test_shaker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_shaker.py b/tests/test_shaker.py index fd3bd9e..612d2d3 100644 --- a/tests/test_shaker.py +++ b/tests/test_shaker.py @@ -67,6 +67,7 @@ def test_collects_call_in_nested_module_body(self, tmp_path): def test_collects_function_call_inside_module(self, tmp_path): names = collect_called_names(parse(tmp_path, "module foo(s) { cube(scale(s)); }")) + assert "cube" in names assert "scale" in names assert "cube" in names From 776771b1d4199a2912fa62cf172ffbd53c87df28 Mon Sep 17 00:00:00 2001 From: Torgny Bjers Date: Sat, 6 Jun 2026 20:36:26 -0400 Subject: [PATCH 2/3] Apply suggested fix to tests/test_shaker.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tests/test_shaker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_shaker.py b/tests/test_shaker.py index 612d2d3..346a657 100644 --- a/tests/test_shaker.py +++ b/tests/test_shaker.py @@ -1,13 +1,14 @@ """Unit tests for openscad_packer.shaker.""" from pathlib import Path from typing import Any +from typing import Any from openscad_parser.ast import getASTfromFile from openscad_parser.ast.nodes import FunctionDeclaration, ModuleDeclaration from openscad_packer.shaker import collect_called_names, compute_reachable - +def parse(tmp_path: Path, content: str) -> list[Any]: def parse(tmp_path: Path, content: str) -> list[Any]: f = tmp_path / "test.scad" f.write_text(content) From c27f053662c2105e25d746042c1bf83c92043a27 Mon Sep 17 00:00:00 2001 From: Torgny Bjers Date: Sat, 6 Jun 2026 20:41:43 -0400 Subject: [PATCH 3/3] Fix corrupted test_shaker.py from bad Copilot Autofix patches Remove duplicate `def parse` header that caused an IndentationError (breaking all 23 tests), duplicate `from typing import Any` import, and duplicate `assert "cube" in names` assertion. Co-Authored-By: Claude Sonnet 4.6 --- tests/test_shaker.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_shaker.py b/tests/test_shaker.py index 346a657..fd3bd9e 100644 --- a/tests/test_shaker.py +++ b/tests/test_shaker.py @@ -1,14 +1,13 @@ """Unit tests for openscad_packer.shaker.""" from pathlib import Path from typing import Any -from typing import Any from openscad_parser.ast import getASTfromFile from openscad_parser.ast.nodes import FunctionDeclaration, ModuleDeclaration from openscad_packer.shaker import collect_called_names, compute_reachable -def parse(tmp_path: Path, content: str) -> list[Any]: + def parse(tmp_path: Path, content: str) -> list[Any]: f = tmp_path / "test.scad" f.write_text(content) @@ -68,7 +67,6 @@ def test_collects_call_in_nested_module_body(self, tmp_path): def test_collects_function_call_inside_module(self, tmp_path): names = collect_called_names(parse(tmp_path, "module foo(s) { cube(scale(s)); }")) - assert "cube" in names assert "scale" in names assert "cube" in names