feat: integrate autoformatting in WriteFile and EditFile commands#273
Closed
ezyang wants to merge 4 commits intogh/ezyang/204/basefrom
Closed
feat: integrate autoformatting in WriteFile and EditFile commands#273ezyang wants to merge 4 commits intogh/ezyang/204/basefrom
ezyang wants to merge 4 commits intogh/ezyang/204/basefrom
Conversation
ezyang
added a commit
that referenced
this pull request
Apr 27, 2025
We're going to integrate autoformatting into the WriteFile and EditFile commands. After doing the file write with these commands, run the "format" command (as defined by RunCommand) if it exists. You should NOT run the pre/post commit associated with RunCommand (because the formatting should be directly integrated with the edit/write), so make sure you hook into the run command infrastructure at the correct spot. ```git-revs 3f698ba (Base revision) c56fb59 Add run_formatter_without_commit to __all__ 3a9183d Add run_formatter_without_commit function to format a specific file without commit operations 13c9c8d Add run_formatter_without_commit import to write_file.py d5459f2 Add autoformatting to write_file_content function 4d419ac Add run_formatter_without_commit import to edit_file.py 2ac534f Add autoformatting to edit_file_content function 77cf162 Improve run_formatter_without_commit to handle different formatter types HEAD Auto-commit format changes ``` codemcp-id: 280-feat-integrate-autoformatting-in-writefile-and-edi ghstack-source-id: 5815be4 Pull-Request-resolved: #273
ezyang
added a commit
that referenced
this pull request
Apr 27, 2025
We're going to integrate autoformatting into the WriteFile and EditFile commands. After doing the file write with these commands, run the "format" command (as defined by RunCommand) if it exists. You should NOT run the pre/post commit associated with RunCommand (because the formatting should be directly integrated with the edit/write), so make sure you hook into the run command infrastructure at the correct spot. ```git-revs 3f698ba (Base revision) c56fb59 Add run_formatter_without_commit to __all__ 3a9183d Add run_formatter_without_commit function to format a specific file without commit operations 13c9c8d Add run_formatter_without_commit import to write_file.py d5459f2 Add autoformatting to write_file_content function 4d419ac Add run_formatter_without_commit import to edit_file.py 2ac534f Add autoformatting to edit_file_content function 77cf162 Improve run_formatter_without_commit to handle different formatter types 2bffaf4 Auto-commit format changes HEAD Replace code_command.py with a simplified implementation of run_formatter_without_commit ``` codemcp-id: 280-feat-integrate-autoformatting-in-writefile-and-edi ghstack-source-id: af84f8e Pull-Request-resolved: #273
Closed
This was referenced Apr 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
We're going to integrate autoformatting into the WriteFile and EditFile commands. After doing the file write with these commands, run the "format" command (as defined by RunCommand) if it exists. You should NOT run the pre/post commit associated with RunCommand (because the formatting should be directly integrated with the edit/write), so make sure you hook into the run command infrastructure at the correct spot.
codemcp-id: 280-feat-integrate-autoformatting-in-writefile-and-edi