Skip to content

chore: annotate ImageBlobs and document the plot arguments - #259

Merged
petercorke merged 2 commits into
mainfrom
chore/types-blobs
Nov 23, 2026
Merged

petercorke merged 2 commits into
mainfrom
chore/types-blobs

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Annotates ImageBlobs.py, the next file in the type-hint work of Issue 60 (10 of 51 parameters were unannotated). Annotation and docstring changes only, no behaviour change.

  • *args: Any on the eight plot_* methods that take a format string (plot_box, plot_centroid, plot_perimeter, plot_ellipse, plot_axes, plot_aligned_box, plot_MEC, plot_MER), fmt: str | None on plot_labelbox, and **kwargs: Any on Image.blobs.
  • Docstrings: none of these methods documented their positional arguments. plot_box had an empty :param arg:. Each now says what the argument does: an optional Matplotlib format string such as "r--", or for plot_centroid the marker, which sets marker in kwargs. plot_labelbox documents fmt. The Blobs class and the mixin had no docstring and now have one.

I left alone the 48 :seealso: fields and 48 Example: blocks, which AGENTS.md says to migrate gradually.

mypy reports no issues and the full suite passes (2158 passed, 33 skipped).

AI-assisted: written with Claude Code (Claude Sonnet 5.5) and reviewed by the maintainer.

🤖 Generated with Claude Code

Part of Issue 60. Types the *args of the plot_ methods, fmt of plot_labelbox
and kwargs of blobs, documents the args and fmt parameters (plot_box had an
empty :param arg:), and gives Blobs and the mixin class docstrings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit 2224dbf into main Nov 23, 2026
34 checks passed
@petercorke
petercorke deleted the chore/types-blobs branch November 23, 2026 09:17
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