Fix the lint on easystitch #111

Closed
opened 2026-07-31 03:10:39 +00:00 by Mark · 1 comment
Owner

Pre-flight lint check for Mark/easystitch failed. Kilo-GSD is hard-gated on clean lint and refuses to start work on this repo until the debt is resolved.

What is dirty

I001 [*] Import block is un-sorted or un-formatted
 --> hermes-verify-e2e.py:2:1
  |
1 | """Ad-hoc verification: mapper->classifier produces varied stitch types."""
2 | import sys
  | ^^^^^^^^^^
3 | sys.path.insert(0, '/home/b/Projects/easystitch')
4 | import numpy as np
  |
help: Organize imports

I001 [*] Import block is un-sorted or un-formatted
 --> hermes-verify-e2e.py:4:1
  |
2 |   import sys
3 |   sys.path.insert(0, '/home/b/Projects/easystitch')
4 | / import numpy as np
5 | | from src.segmentation import SegmentedRegion, region_to_pathdata, extract_shared_boundaries
6 | | from src.embroidery_converter.classifier import classify_stitch_type, split_path_components
7 | | from src.embroidery_converter.data import StitchType
  | |____________________________________________________^
8 |
9 |   results = []
  |
help: Organize imports

E501 Line too long (180 > 120)
  --> hermes-verify-e2e.py:11:121
   |
 9 | …
10 | …
11 | …t64),color_rgb=(200,100,50),color_lab=np.array([50,10,10]),fill_type="solid",label=1,area=30000)
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 | …
13 | …I_FILL))
   |

E501 Line too long (180 > 120)
  --> hermes-verify-e2e.py:15:121
   |
13 | …I_FILL))
14 | …
15 | …4),color_rgb=(100,150,200),color_lab=np.array([50,-10,-20]),fill_type="solid",label=2,area=4000)
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 | …
17 | …))

Why this issue exists

Kilo-GSD was attempting Mark/easystitch#104 but the preflight ruff check . returned non-zero. We do not knowingly pass along lint errors; the original ticket is held until this one is resolved and the lint is clean.

Scope

Fix every lint error reported above so ruff check . exits 0 against Mark/easystitch. Do not change behavior — only fix style/dead-code/safety issues that lint flags. Commit on a branch and open a PR. Once merged, kilo-gsd will resume the held tickets.

Pre-flight lint check for `Mark/easystitch` failed. Kilo-GSD is hard-gated on clean lint and refuses to start work on this repo until the debt is resolved. ## What is dirty ``` I001 [*] Import block is un-sorted or un-formatted --> hermes-verify-e2e.py:2:1 | 1 | """Ad-hoc verification: mapper->classifier produces varied stitch types.""" 2 | import sys | ^^^^^^^^^^ 3 | sys.path.insert(0, '/home/b/Projects/easystitch') 4 | import numpy as np | help: Organize imports I001 [*] Import block is un-sorted or un-formatted --> hermes-verify-e2e.py:4:1 | 2 | import sys 3 | sys.path.insert(0, '/home/b/Projects/easystitch') 4 | / import numpy as np 5 | | from src.segmentation import SegmentedRegion, region_to_pathdata, extract_shared_boundaries 6 | | from src.embroidery_converter.classifier import classify_stitch_type, split_path_components 7 | | from src.embroidery_converter.data import StitchType | |____________________________________________________^ 8 | 9 | results = [] | help: Organize imports E501 Line too long (180 > 120) --> hermes-verify-e2e.py:11:121 | 9 | … 10 | … 11 | …t64),color_rgb=(200,100,50),color_lab=np.array([50,10,10]),fill_type="solid",label=1,area=30000) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 | … 13 | …I_FILL)) | E501 Line too long (180 > 120) --> hermes-verify-e2e.py:15:121 | 13 | …I_FILL)) 14 | … 15 | …4),color_rgb=(100,150,200),color_lab=np.array([50,-10,-20]),fill_type="solid",label=2,area=4000) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 16 | … 17 | …)) ``` ## Why this issue exists Kilo-GSD was attempting `Mark/easystitch#104` but the preflight `ruff check .` returned non-zero. We do not knowingly pass along lint errors; the original ticket is held until this one is resolved and the lint is clean. ## Scope Fix every lint error reported above so `ruff check .` exits 0 against `Mark/easystitch`. Do not change behavior — only fix style/dead-code/safety issues that lint flags. Commit on a branch and open a PR. Once merged, kilo-gsd will resume the held tickets.
Author
Owner

Lint cleanup done — PR ready for review/merge: #113 (branch lint-cleanup/easystitch-111 → main).

What was fixed (14 errors → ruff check . exits 0):

Tracked (committed in the PR):

  • tests/test_gradient_pattern_fill.py — UP035 (typing.Iterable → collections.abc.Iterable), I001 (import sort), UP037 (drop quotes from _post_digitize annotation; PEP 563 active).

Untracked leftovers (fixed in place in the local working tree so the preflight passes; deliberately NOT committed — their commit/backout/attach fate is #109's pending decision):

  • hermes-verify-e2e.py — 2× I001, 4× E501 (line wraps only)
  • src/raster/photo_segmentation.py — 3× F401 (unused scipy.ndimage imports), 1× F841 (dead mask assignment)
  • tests/test_photo_segmentation.py — I001

Verification: ruff check . exit 0; py_compile on all edited files; tests/test_photo_segmentation.py 41/41 passed; module import + API surface check on photo_segmentation.py PASS. Note: tests/test_gradient_pattern_fill.py fails to collect with a pre-existing circular-import error that also reproduces on a clean origin/main worktree (40d2f3b) — unrelated to this change; repo CI has been failing on it for many runs.

To unblock the queue: merge PR #113, then strip blocked:preflight from the held tickets (#104, #105, #109) or let triage re-dispatch — kilo-gsd's preflight will pass on a fresh checkout of main.

Lint cleanup done — PR ready for review/merge: **https://forgejo.tail018ac4.ts.net/Mark/easystitch/pulls/113** (branch `lint-cleanup/easystitch-111` → `main`). **What was fixed (14 errors → `ruff check .` exits 0):** Tracked (committed in the PR): - `tests/test_gradient_pattern_fill.py` — UP035 (`typing.Iterable` → `collections.abc.Iterable`), I001 (import sort), UP037 (drop quotes from `_post_digitize` annotation; PEP 563 active). Untracked leftovers (fixed in place in the local working tree so the preflight passes; deliberately NOT committed — their commit/backout/attach fate is #109's pending decision): - `hermes-verify-e2e.py` — 2× I001, 4× E501 (line wraps only) - `src/raster/photo_segmentation.py` — 3× F401 (unused `scipy.ndimage` imports), 1× F841 (dead `mask` assignment) - `tests/test_photo_segmentation.py` — I001 **Verification:** `ruff check .` exit 0; `py_compile` on all edited files; `tests/test_photo_segmentation.py` 41/41 passed; module import + API surface check on `photo_segmentation.py` PASS. Note: `tests/test_gradient_pattern_fill.py` fails to *collect* with a pre-existing circular-import error that also reproduces on a clean `origin/main` worktree (40d2f3b) — unrelated to this change; repo CI has been failing on it for many runs. **To unblock the queue:** merge PR #113, then strip `blocked:preflight` from the held tickets (#104, #105, #109) or let triage re-dispatch — kilo-gsd's preflight will pass on a fresh checkout of `main`.
Mark 2026-07-31 03:55:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/easystitch#111
No description provided.