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

Update update_markdown_code_blocks.py #112

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 18, 2024

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced error handling for the format_code_with_ruff function to improve robustness.

πŸ“Š Key Changes

  • Changed the subprocess call for ruff check to enforce an exception on failure (check=True).
  • Added individual try-except blocks for ruff check, ruff format, and docformatter to capture and print specific errors.

🎯 Purpose & Impact

  • Increased Reliability: Ensures that errors are properly captured and reported, making the debugging process easier.
  • Improved Clarity: Provides specific feedback on which step failed, aiding in quick issue resolution.

@glenn-jocher glenn-jocher merged commit 4d938e0 into main Jun 18, 2024
1 check passed
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch June 18, 2024 23:37
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