Skip to content

chore(types): retire two modules from the mypy debt list - #332

Open
BILLKISHORE wants to merge 2 commits into
OpenAdaptAI:mainfrom
BILLKISHORE:chore/retire-mypy-debt-modules
Open

chore(types): retire two modules from the mypy debt list#332
BILLKISHORE wants to merge 2 commits into
OpenAdaptAI:mainfrom
BILLKISHORE:chore/retire-mypy-debt-modules

Conversation

@BILLKISHORE

Copy link
Copy Markdown

What changed

  • Drop validation.pixel_identity_aligned from the mypy debt list. It has no type errors.
  • Annotate the image in phash_png as Image.Image, which lets vision.hashing come off the list too.

Why

Image.open() is typed as returning ImageFile while .crop() returns Image, so rebinding img inside the region branch was the only error in vision.hashing. pixel_identity_aligned needed nothing at all, it looks like it got fixed at some point without the entry being removed.

I updated the comment block above the list as well, since it names both modules by hand.

Checks

  • mypy: 230 source files, no issues
  • ruff check and ruff format --check: passed
  • pytest: 4595 passed, 43 skipped

I measured the rest of the list while I was in there: 67 errors left across 18 modules, and about half of those modules have only one or two each. Happy to keep working through them if this shape looks right to you.

The module has no type errors; it was listed but never removed.
Image.open returns ImageFile but crop returns Image, so the rebind in
phash_png did not type-check. Retires vision.hashing from the debt list.
@BILLKISHORE
BILLKISHORE requested a review from abrichr as a code owner August 2, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant