Repository navigation
chore: annotate ImageIO - #260
Merged
Merged
Conversation
Part of Issue 60. Types showwindow(h, ax), the Window helper class and the stereo Cursor class, and gives the mixin a docstring. Drops a :type: line that the signature now gives. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Annotates
ImageIO.py, the last library file in the type-hint work of Issue 60 (7 of 39 parameters and 1 of 15 returns were unannotated). Thebin/command-line scripts are left as they are, since they are not part of the public API. Annotation and docstring changes only, no behaviour change.showwindow(h: int, ax: Axes | None = None), theWindowhelper class it returns (h,ax, andimage: ImageMixinBase | None) and the stereoCursorclass instdisp(ax: Axes, ax2: Axes, returnsNone) are typed.imageis theImageMixinBase, which has_A, because the mixin passes itself.:type h: intline that the signature now gives is removed.if TYPE_CHECKING: passblock, and the import it made unused, are removed.I left alone the 7
:seealso:fields and 7Example:blocks, which AGENTS.md says to migrate gradually.ruff checkreports one unused variable (yinCursor.on_mouse_move) that was there before and is not part of this change.With this, parameter annotations across
src/machinevisiontoolboxgo from 86.1% (Issue 60, 2026-10-17) to 95.2%, and returns from 92.7% to 96.2%, counting the PRs that have merged or are queued. What is left is thebin/scripts.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