Skip to content

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 7, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improving code documentation and readability for callback functions in YOLOv5.

πŸ“Š Key Changes

  • Enhanced the docstrings of callback functions with clear argument type annotations.
  • Simplified get_registered_actions function by using a single-line return statement.

🎯 Purpose & Impact

  • Purpose: To clarify the expected types of arguments for callback functions, ensuring better understandability for developers.
  • Impact: The changes make the code more Pythonic and easier to read, potentially reducing bugs and easing maintenance and future development efforts. Regular users will experience no direct impact, but developers contributing to or interfacing with YOLOv5 will benefit from clearer guidelines when using callbacks. βœ¨πŸ”§

@glenn-jocher glenn-jocher self-assigned this Apr 7, 2022
@glenn-jocher glenn-jocher merged commit 676e10c into master Apr 7, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch April 7, 2022 14:15
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Simplify callbacks.py return

* Indent args (pytorch convention)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants