Fix Python formatting issues#28
Conversation
|
👋 Hello @pderrenger, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Clean formatting-only PR. The changes shown are limited to docstring shortening, line reflow, and removal of an unused local assignment, with no obvious behavioral regressions in the diff.
|
🎉 Merged! Huge thanks to @pderrenger for this thoughtful cleanup pass, with contributions from @glenn-jocher. “Simplicity is the ultimate sophistication.” — Leonardo da Vinci This PR reflects that well: clearer docstrings, cleaner formatting, and removal of small inconsistencies all make the codebase easier to read, review, and maintain without changing behavior. These kinds of improvements quietly strengthen the foundation for everyone building on top of it. Really appreciate the care and attention to detail here 🙌 |
Summary
utils/datasets.pyTests
python -m ruff check --extend-select F,I,D,UP,RUF,FA --target-version py39 --ignore D100,D104,D203,D205,D212,D213,D401,D406,D407,D413,RUF001,RUF002,RUF012 utils/datasets.pypython -m ruff format --line-length 120 utils/datasets.pyultralytics-actions-format-python-docstrings utils/datasets.pypython -m py_compile utils/datasets.pygit diff --check🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
🧹 This PR is a code cleanup update that improves readability and consistency in dataset and utility helpers without changing core functionality.
📊 Key Changes
utils/datasets.pyandutils/utils.pyto make function purposes clearer and more concise.random_affine()function signature formatting to make its arguments easier to scan and maintain.h, w, _ = img1.shape) from dataset processing code.🎯 Purpose & Impact