Skip to content

Add types for test_multi_view_collate.py - #2079

Open
Bhavyashah20 wants to merge 1 commit into
lightly-ai:masterfrom
Bhavyashah20:type-test-multi-view-collate
Open

Bhavyashah20 wants to merge 1 commit into
lightly-ai:masterfrom
Bhavyashah20:type-test-multi-view-collate

Conversation

@Bhavyashah20

@Bhavyashah20 Bhavyashah20 commented Oct 11, 2026 •

Copy link
Copy Markdown

Part of #1635.

  • Add -> None return annotations to the three test functions.
  • Annotate batch in test_empty_batch.
  • Remove tests/data/test_multi_view_collate.py from the mypy exclude list in pyproject.toml.

No behavior change. make format, mypy lightly tests and pytest tests/data/test_multi_view_collate.py all pass locally.

  • Added return annotations to three tests and a type annotation for batch in test_empty_batch.
  • Removed tests/data/test_multi_view_collate.py from the mypy exclusion list.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 920b352a-b070-435a-9e2f-8da4cddfe382

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf8392 and b3cf630.


📒 Files selected for processing (2)
  • pyproject.toml
  • tests/data/test_multi_view_collate.py

💤 Files with no reviewable changes (1)
  • pyproject.toml

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



📝 Walkthrough

Walkthrough

The multi-view collate tests gain return type annotations and an explicit type for the empty-batch variable. The test file is removed from mypy’s exclusion pattern.

Changes

Mypy test coverage

Layer / File(s) Summary
Annotate and include the tests
tests/data/test_multi_view_collate.py, pyproject.toml
The test functions gain None return annotations, and the empty-batch variable gains a type annotation. The file is removed from mypy’s exclusion pattern. Test assertions and behavior are unchanged.

Priority: ⬇️ Low

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

Change: Other


Merge Risk: ⚪ Minimal · up to b3cf6

The change adds type annotations and enables mypy checking for this test file. The inspected types are compatible, with no actionable merge-blocking risk identified.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding type annotations to tests/data/test_multi_view_collate.py.
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.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch has not been deployed

No deployments
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