Add types for crop_image_by_bounding_boxes.py - #2060
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughChangesTyped cropping module
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change modernizes cropping type annotations, correctly represents optional class names, and enables type checking without an identified behavior regression. It is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
class_namesas optional to match itsNonedefaultcrop_image_by_bounding_boxes.pyPart of #1635.
Testing
make formatmake static-checkspytest tests/cli/test_cli_crop.pymake all-checksmake all-checkscompleted with 1,468 passed and 209 skipped. One unrelateddistributed DCL test failed locally:
tests/utils/test_dist__gather__losses.py::TestGatherLayer_Losses::test_loss_dclThe failure reproduces independently and does not involve the modified code.
All crop CLI tests passed.
Adds modern type annotations to
crop_image_by_bounding_boxes.py, including optionalclass_namesand fixed-length crop-box tuples. Enables mypy checks for the file.