Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Pyplot import and plotting access lightly/utils/debug.py, tests/utils/test_debug.py |
The module stores pyplot or its import error. The plotting function retrieves pyplot through a helper and uses it to create the figure and subplots. Tests load pyplot through importlib. |
Transform annotations and type checking lightly/utils/debug.py, pyproject.toml, tests/utils/test_debug.py |
The transform parameter gains an Any annotation, while the existing transform dispatch remains in place. Mypy exclusions are removed, and test helpers and methods gain annotations. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Possibly related PRs
- lightly-ai/lightly#2070: Both PRs remove stale mypy exclusions from
pyproject.toml; this PR removes exclusions for the debug utility and its tests.
Suggested reviewers: philippmwirth
Merge Risk: 
Minimal · up to 40c50
-
No actionable merge-blocking risk is established for this PR.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
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.
Comment @coderabbitai help to get the list of available commands.
Part of #1635.
Summary
lightly/utils/debug.pyandtests/utils/test_debug.pytorchvisionimport# type: ignore[arg-type]Validation
make type-checkmake format-checkuv run --frozen pytest tests/utils/test_debug.py— 11 passedAdd type annotations to
lightly/utils/debug.pyandtests/utils/test_debug.py. Remove both files from the mypy exclusion list. Keep Matplotlib import errors separate frompyplot, and retain the invalid-transform test with a targeted type ignore.The author reports that type checks, formatting checks, and the debug utility tests passed (11 tests).