Skip to content

Add types for read_yolo_label_file.py - #2046

Open
yashkuceriya wants to merge 1 commit into
lightly-ai:masterfrom
yashkuceriya:typecheck-yolo-label-reader
Open

Add types for read_yolo_label_file.py#2046
yashkuceriya wants to merge 1 commit into
lightly-ai:masterfrom
yashkuceriya:typecheck-yolo-label-reader

Conversation

@yashkuceriya

@yashkuceriya yashkuceriya commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove read_yolo_label_file.py from the mypy exclusion list. The file is already fully annotated, so this brings it under continuous type checking and prevents future type regressions.

Part of #1635.

Checks

  • mypy 1.4.1 lightly/utils/cropping/read_yolo_label_file.py
  • ruff 0.12.7 check lightly tests
  • ruff 0.12.7 format --check lightly tests
  • git diff --check

Removes read_yolo_label_file.py from the mypy exclusion list. This adds continuous type-checking coverage for the file.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 32e8f15b-5a01-4b96-b693-5591247ffdc2

📥 Commits

Reviewing files that changed from the base of the PR and between e8d317f and d70c2b1.

📒 Files selected for processing (1)
  • pyproject.toml
💤 Files with no reviewable changes (1)
  • pyproject.toml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The mypy configuration no longer excludes lightly/utils/cropping/read_yolo_label_file.py. Mypy will now type-check this file.

Changes

Mypy coverage update

Layer / File(s) Summary
Enable YOLO label type checking
pyproject.toml
The mypy exclusion list no longer contains the YOLO label reader path.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to d70c2

This narrowly enables continuous type checking for an already annotated file and introduces no actionable merge-blocking risk beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the correct file and the type-checking change. It is slightly imprecise because the pull request enables mypy checking rather than adding type annotations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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