From d5578087ecb9c873b80989878efc4c519024b017 Mon Sep 17 00:00:00 2001 From: Torgny Bjers Date: Sat, 6 Jun 2026 16:34:02 -0400 Subject: [PATCH 1/2] Apply suggested fix to tests/test_upstream_patches.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tests/test_upstream_patches.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_upstream_patches.py b/tests/test_upstream_patches.py index 0d8ea57..e52b921 100644 --- a/tests/test_upstream_patches.py +++ b/tests/test_upstream_patches.py @@ -127,8 +127,9 @@ def test_three_arg_range_explicit_step_preserved(self, tmp_path): assert "[0:1:2]" in out def test_three_arg_range_large_step_preserved(self, tmp_path): - # [0:5:1] means start=0, step=5, end=1 — semantically different from [0:1] - # ([0:5] is a two-arg range: start=0, end=5, implicit step=1.) + # [0:5:1] is a three-arg range [start:step:end] => start=0, step=5, end=1. + # This is semantically different from two-arg [0:1] ([start:end], implicit step=1). + # Likewise, [0:5] is also two-arg and must not replace [0:5:1]. src = "x = [for (i=[0:5:1]) i];" out = parse_and_print(tmp_path / "t.scad", src) assert "[0:5:1]" in out From 0fa35aecb7eafcc24312acb5f3c11d99b1baf056 Mon Sep 17 00:00:00 2001 From: Torgny Bjers Date: Sat, 6 Jun 2026 16:34:02 -0400 Subject: [PATCH 2/2] Apply suggested fix to tests/test_upstream_patches.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tests/test_upstream_patches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_upstream_patches.py b/tests/test_upstream_patches.py index e52b921..8cbf833 100644 --- a/tests/test_upstream_patches.py +++ b/tests/test_upstream_patches.py @@ -28,7 +28,7 @@ def parse_and_print(path: Path, src: str) -> str: """Write *src* to *path*, parse it, and pretty-print back to string.""" path.write_text(src, encoding="utf-8") nodes = getASTfromFile(str(path), process_includes=False) or [] - return to_openscad(nodes) + return to_openscad(nodes) or "" def pack(entry: Path, library_paths: list[str] | None = None) -> str: