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

uv add changes pyproject.toml indentation #5009

Closed
konstin opened this issue Jul 12, 2024 · 4 comments · Fixed by #5075
Closed

uv add changes pyproject.toml indentation #5009

konstin opened this issue Jul 12, 2024 · 4 comments · Fixed by #5075
Assignees
Labels
help wanted Contribution especially encouraged preview Experimental behavior

Comments

@konstin
Copy link
Member

konstin commented Jul 12, 2024

When using uv add on a project.dependencies with indentation 2, it changes the indentation to 4 for the entire list, creating a big diff. uv add should instead respect the existing indentation.

@konstin konstin added the preview Experimental behavior label Jul 12, 2024
@charliermarsh charliermarsh added the help wanted Contribution especially encouraged label Jul 12, 2024
@flyaroundme
Copy link
Contributor

To me it looks like not being possible if using only toml_edit rust crate that is currently used. Seems like it requires to fork toml_edit to respect indentation while (de)serializing toml files heh

@charliermarsh
Copy link
Member

What about in reformat_array_multiline? It seems like we unequivocally add four spaces there.

@flyaroundme
Copy link
Contributor

Ah yeah exactly, missed that

@flyaroundme
Copy link
Contributor

I'm working on it, reworking reformat_array_multiline, so you can assign to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contribution especially encouraged preview Experimental behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants