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 #2313

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Apply ruff==0.9.0 formatting #2313

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

Minor improvements made for code style consistency and updated hardware references in documentation. 🎨🔧

📊 Key Changes

  • Updated documentation to reference p4 instances instead of p3 for AWS GPU benchmarks.
  • Code style refinements:
    • Replaced redundant variable assignments with inline walrus operator (:=).
    • Unified string formatting with consistent usage of double quotes (") instead of mixed styles.
    • Simplified assertions and list processing logic in some scripts.
  • Removed commented-out, unused code for better readability and maintenance.

🎯 Purpose & Impact

  • Purpose: Enhance code readability and maintain consistency throughout the repository while ensuring documentation reflects modern, relevant hardware specifications.
  • Impact: Developers benefit from cleaner, more efficient code. Documentation updates provide clearer guidance on hardware configurations, aiding replication of benchmarks. No functional changes to YOLOv3's behavior, ensuring backward compatibility. 🚀

@UltralyticsAssistant UltralyticsAssistant added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 10, 2025
@UltralyticsAssistant
Copy link
Member

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

  • Define a Purpose: Clearly explain the purpose of your PR (Apply ruff==0.9.0 formatting), and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm that your PR is in sync with the ultralytics/yolov3 main branch. If it's behind, you can 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 Ultralytics Continuous Integration (CI) checks pass successfully. If any checks fail, please address the issues highlighted.
  • Update Documentation: Update the documentation if your changes impact the user experience or introduce new functionality.
  • Add Tests: If possible, include or update tests to confirm your changes. Ensure all tests pass locally before submitting the PR.
  • Sign the CLA: If this is your first Ultralytics PR, please ensure you have signed our Contributor License Agreement (CLA). Comment "I have read the CLA Document and I sign the CLA" to acknowledge it.
  • Minimize Changes: Keep the changes scoped and focused on the stated purpose of your PR. This ensures clarity and makes reviewing more efficient.

🛠️ Summary of PR Purpose

This PR adapts the YOLOv3 codebase with formatting updates based on the latest Ruff formatter (ruff==0.9.0). These changes aim to maintain consistent and clean code styling while adhering to the updates in the formatter's rules.

📊 Key Highlights:

  • Applied Python 3.8 assignment expressions (:=, "walrus operator") to improve readability and modernize syntax.
  • Refactored dictionary merging using the | operator.
  • Removed commented-out, unused code for decluttering.
  • Addressed minor formatting errors to align with ruff==0.9.0 standards.

🌟 Learn more about contributing:

Please refer to our Contributing Guide for more tips on making contributions to the YOLOv3 repository.

Resources to explore Ultralytics:

This is an automated response to assist with your submission. An Ultralytics engineer will review your PR shortly to provide additional feedback or approval. Thank you for contributing! 🚀

@glenn-jocher glenn-jocher merged commit a62c0f2 into master Jan 10, 2025
8 checks passed
@glenn-jocher glenn-jocher deleted the refactor-20250110011829 branch January 10, 2025 00:28
@UltralyticsAssistant
Copy link
Member

🎉 Your PR has been merged, @glenn-jocher! Thank you for your thoughtful contributions to cleaner, more consistent code and updated, real-world-relevant documentation. 🚀 These refinements lay the groundwork for better collaboration and understanding across our community.

As Marcus Aurelius once said, "What stands in the way becomes the way." By addressing these details head-on, you’ve helped turn small obstacles into pathways for progress. Your work makes a difference—thank you for the dedication and craftsmanship! 🙌

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

Successfully merging this pull request may close these issues.

2 participants