-
Notifications
You must be signed in to change notification settings - Fork 22
Run Formatter on generated tests #895
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
|
Codeflash Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
PR Reviewer Guide 🔍(Review updated until commit 65cba54)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 65cba54
Previous suggestionsSuggestions up to commit 60bb705
|
|
Persistent review updated to latest commit 65cba54 |
| formatter_cmds, original_temp, test_dir_str, print_status=False, exit_on_failure=False | ||
| ) | ||
| if not changed: | ||
| return re.sub(r"\n{2,}", "\n\n", formatted_code) |
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.
nit: Can try to merge line 100 and 111 in 1 then repeating it.
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.
@Saga4 it's a shortcut the function will take if there are no formatters provided which could happen often
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.
I've yet to see a project without a formatter, know of any?
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.
PR Type
Enhancement, Bug fix
Description
Add formatter for generated tests
Apply formatting before embedding in markdown
Minor typo fix in comment
Diagram Walkthrough
File Walkthrough
formatter.py
Introduce helper to format generated codecodeflash/code_utils/formatter.py
format_generated_codeto condense blank lines.function_optimizer.py
Apply formatting to generated test snippetscodeflash/optimization/function_optimizer.py
format_generated_code.