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

Simplify callbacks.py return #7333

Merged
merged 4 commits into from
Apr 7, 2022
Merged

Simplify callbacks.py return #7333

merged 4 commits into from
Apr 7, 2022

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.

1 participant