Skip to content
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

Apply ruff==0.9.0 formatting #240

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Apply ruff==0.9.0 formatting #240

merged 2 commits into from
Jan 10, 2025

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jan 10, 2025

This Ultralytics PR reformats this repo with the latest improved Ruff version 0.9.0 formatter.

Learn more about Ultralytics:

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved code readability and streamlined logic across authentication and test cases.

📊 Key Changes

  • Simplified the authenticate method in auth.py by using an inline assignment expression (:=) for better code clarity.
  • Consolidated multi-line assertions in various test cases (test_dataset.py, test_model.py, test_project.py) into single-line assertions for improved readability.

🎯 Purpose & Impact

  • 🛠️ Cleaner Code: The use of inline assignments and concise assertions makes the code easier to read and maintain.
  • 🚀 Improved Developer Experience: Simplified test cases and authentication logic enhance code quality, benefiting both contributors and maintainers.
  • No User-Facing Impact: These changes primarily enhance internal code structure, with no visible effects on end-users.

@UltralyticsAssistant UltralyticsAssistant added devops GitHub Devops or MLops enhancement New feature or request labels Jan 10, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @glenn-jocher, thank you for submitting an ultralytics/hub-sdk 🚀 PR! To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your change in your PR description. In this case, it would be helpful to describe why applying Ruff 0.9.0 formatting is beneficial for the project.
  • Synchronize with Source: Confirm that your PR is up-to-date with the ultralytics/hub-sdk main branch. If your branch is behind, please update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify that all Continuous Integration (CI) checks are passing. If they fail, please review the logs and address any issues.
  • Update Documentation: If applicable, ensure you update relevant documentation for any changes introduced by this PR.
  • Add Tests: For code format changes such as this one, ensure no tests are negatively impacted. If any tests fail, please address them and confirm that all tests are passing.
  • Sign the CLA: If this is your first contribution to an Ultralytics repository, please ensure you have signed our Contributor License Agreement (CLA) by adding the statement "I have read the CLA Document and I sign the CLA" in a new comment.
  • Minimize Changes: Limit your modifications to only what is necessary to apply Ruff 0.9.0 formatting. This keeps the PR clear and focused.

For additional tips and guidance, visit our Contributing Guide. If you have any questions about the PR process, don't hesitate to leave a comment. An Ultralytics engineer will review it soon! ✨

Learn more about Ultralytics:

🚀 Thank you for contributing to Ultralytics and helping us maintain high standards for code quality! 😊

@glenn-jocher glenn-jocher merged commit 47d0d05 into main Jan 10, 2025
7 checks passed
@glenn-jocher glenn-jocher deleted the refactor-20250110012830 branch January 10, 2025 00:41
@UltralyticsAssistant
Copy link
Member

🎉 Your PR has been merged, @glenn-jocher! Thank you for your dedication to cleaner, more efficient code. The streamlined logic and concise assertions you contributed truly elevate the foundation of this project.

As Leonardo da Vinci once said, "Simplicity is the ultimate sophistication." Your work in simplifying authentication and test cases exemplifies this perfectly, making the path smoother for all who build upon it. 🚀

Keep inspiring through your contributions — they really do make a difference! 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops GitHub Devops or MLops enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants