From 469bf38a0e416d88b194e2301ac1046b9443a809 Mon Sep 17 00:00:00 2001 From: BILLKISHORE Date: Sun, 2 Aug 2026 21:21:53 +0530 Subject: [PATCH 1/2] chore(types): drop pixel_identity_aligned from the mypy debt list The module has no type errors; it was listed but never removed. --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ddb27edd..150b05f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -415,8 +415,7 @@ follow_imports_for_stubs = true # - the VLM microservice (FastAPI, dynamic): services.vlm_service.* # - offline validation harnesses (not on the runtime path): # validation.* (dense_surface, identity_ladder, -# pixel_identity_probe, pixel_identity_aligned, -# vlm_identity_probe) +# pixel_identity_probe, vlm_identity_probe) # - perceptual hashing on numpy internals: vision.hashing [[tool.mypy.overrides]] module = [ @@ -437,7 +436,6 @@ module = [ "openadapt_flow.validation.dense_surface", "openadapt_flow.validation.identity_ladder", "openadapt_flow.validation.pixel_identity_probe", - "openadapt_flow.validation.pixel_identity_aligned", "openadapt_flow.validation.vlm_identity_probe", "openadapt_flow.vision.hashing", ] From 96df2d64c4ef3d961b71a53969da5761823b32e5 Mon Sep 17 00:00:00 2001 From: BILLKISHORE Date: Sun, 2 Aug 2026 21:22:31 +0530 Subject: [PATCH 2/2] fix(types): annotate the phash image as Image.Image 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. --- openadapt_flow/vision/hashing.py | 2 +- pyproject.toml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/openadapt_flow/vision/hashing.py b/openadapt_flow/vision/hashing.py index a02e18e3..6f25add5 100644 --- a/openadapt_flow/vision/hashing.py +++ b/openadapt_flow/vision/hashing.py @@ -38,7 +38,7 @@ def phash_png(png: bytes, region: Region | None = None) -> str: Raises: ValueError: If ``region`` is empty after clamping. """ - img = Image.open(io.BytesIO(png)) + img: Image.Image = Image.open(io.BytesIO(png)) if region is not None: x, y, w, h = region x0, y0 = max(0, x), max(0, y) diff --git a/pyproject.toml b/pyproject.toml index 150b05f2..5dc19220 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -416,7 +416,6 @@ follow_imports_for_stubs = true # - offline validation harnesses (not on the runtime path): # validation.* (dense_surface, identity_ladder, # pixel_identity_probe, vlm_identity_probe) -# - perceptual hashing on numpy internals: vision.hashing [[tool.mypy.overrides]] module = [ "openadapt_flow.__main__", @@ -437,7 +436,6 @@ module = [ "openadapt_flow.validation.identity_ladder", "openadapt_flow.validation.pixel_identity_probe", "openadapt_flow.validation.vlm_identity_probe", - "openadapt_flow.vision.hashing", ] ignore_errors = true