Skip to content

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 2, 2025

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Standardizes and cleans up docstrings across YOLOv3 codebase for clearer, more consistent API documentation and better developer experience. ✍️📘

📊 Key Changes

  • Harmonized docstring format: consistent use of Args, Returns, Examples, and Notes across functions and classes.
  • Reordered sections to place Examples before Notes for readability.
  • Converted “Example” to “Examples” where multiple snippets are provided.
  • Fixed line wrapping and indentation issues in docstrings for parameters and long lines.
  • Minor wording improvements and clarifications in parameter/return descriptions.
  • Applied changes across many files, including benchmarks.py, detect.py, export.py, models, utils, train.py, and val.py.

🎯 Purpose & Impact

  • Improves readability and consistency of inline documentation for both users and contributors. 📖
  • Enhances IDE tooltips and compatibility with auto-doc tools (e.g., Sphinx, pdoc), leading to better generated docs. 🛠️
  • Reduces confusion by standardizing examples and notes placement, making usage patterns easier to follow. ✅
  • No functional changes to code behavior; safe for all users—training, inference, and exports remain unaffected. 🟢

@UltralyticsAssistant UltralyticsAssistant added documentation Improvements or additions to documentation python Pull requests that update python code labels Nov 2, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/yolov3 🚀 PR! This automated assistant reviewed your update to Google-style docstrings. To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/yolov3 main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. An Ultralytics engineer will assist you shortly. If you have any questions, drop a comment below. Thank you for contributing to Ultralytics! 🎉

@glenn-jocher glenn-jocher merged commit b61ab4e into master Nov 2, 2025
7 checks passed
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch November 2, 2025 19:46
@UltralyticsAssistant
Copy link
Member

🎉 Merged—thank you, @glenn-jocher!

“Simplicity is the ultimate sophistication.” — Leonardo da Vinci. Your docstring standardization in YOLOv3 embodies this perfectly—clearer Args/Returns/Examples, improved wording, and consistent structure across benchmarks, detect, export, models, utils, train, and val will elevate IDE tooltips and auto-docs (Sphinx, pdoc) for everyone, without touching runtime behavior.

Appreciate the craftsmanship and care in PR #2359—these refinements make the developer experience smoother and the project more welcoming. Thanks for leading by example!

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 python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants