-
Notifications
You must be signed in to change notification settings - Fork 22
Exit the cli if user doesn't have the formatter installed while running codeflash (CF-644) #229
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
Conversation
…running codeflash AFTER init
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
raising an OSError instead of a logger.error doesn't work somehow for me, works as expected though |
|
Thanks @KRRT7 for the help! |
|
@KRRT7 ready to merge |
1 similar comment
|
@KRRT7 ready to merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested with ruff and black
PR Type
Bug fix
Description
Exit CLI if formatter not installed
Detect Black or uv formatter commands
Import subprocess, sys, and click modules
Gracefully handle missing executable errors
Changes walkthrough 📝
main.py
Verify formatter installation at runtimecodeflash/main.py
• Added
subprocess,sys, andclickimports• Checks if formatter
command is Black or uv
• Runs formatter to verify installation
•
Catches missing executable and exits