-
-
Notifications
You must be signed in to change notification settings - Fork 3
Ruff RUF refactor
#15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Glenn Jocher <[email protected]>
|
👋 Hello @username, thank you for submitting an
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
|
🎉 Merge celebration! Huge thanks, @glenn-jocher, for the thoughtful modernization in PR #15. “Simplicity is the ultimate sophistication.” — Leonardo da Vinci Appreciate you leading by example and keeping the codebase sharp and modern. 🙌 |
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Modernizes type hints across the codebase to Python 3.10 style, cleans up imports, and makes minor refactors for clarity without changing runtime behavior. 🧹🧩
📊 Key Changes
str | None) and enabled postponed evaluation viafrom __future__ import annotationsacross modules.Optional/Unionusages and updated function signatures for consistency._b,_num_heads) to avoid “unused” warnings.math.floorusage).compress_params) using unpacking for clarity.🎯 Purpose & Impact
|union types. Users on older Python versions will need to upgrade.