Conversation
This change primarily adds a dev dependency on the pyproject-fmt package to auto-format the pyproject.toml file, and adds the logic to do so to `./run format`. The implementation is kinda convoluted because the package has an inconvenient interface and returns a 1 when it successfully formats a file that needed changes, rather than returning 0. This change also reformats json5/tool.py and updates the uv.lock file to pick up newer packages. I'm of mixed feelings about uv.lock updating existing packages whenever a new dependency is added (rather than only updating expackages when explicitly asked to do so), so I can see changing the logic for how we're managing packages in the future either back to explicitly pinning versions by default, or to do something else.
Owner
Author
|
@ulgens - thoughts? |
Contributor
|
@dpranke I prefer to use pyproject-fmt as a git hook, with the following config:
|
Owner
Author
|
Yeah, git hooks would probably work too. I'll switch to your settings, as I have no strong opinions and 4 spaces appears to match what |
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.
This change primarily adds a dev dependency on the pyproject-fmt package to auto-format the pyproject.toml file, and adds the logic to do so to
./run format. The implementation is kinda convoluted because the package has an inconvenient interface and returns a 1 when it successfully formats a file that needed changes, rather than returning 0.This change also reformats json5/tool.py and updates the uv.lock file to pick up newer packages. I'm of mixed feelings about uv.lock updating existing packages whenever a new dependency is added (rather than only updating expackages when explicitly asked to do so), so I can see changing the logic for how we're managing packages in the future either back to explicitly pinning versions by default, or to do something else.