Skip to content

TOML formatting using pyproject-fmt - #299

Merged
flying-sheep merged 15 commits into
mainfrom
update-formatters
Sep 2, 2024
Merged

flying-sheep merged 15 commits into
mainfrom
update-formatters

Conversation

@flying-sheep

@flying-sheep flying-sheep commented Jul 30, 2024 •

Copy link
Copy Markdown
Member

Fixes #212

An alternative to #225, see #212 for a comparison

@github-actions

Copy link
Copy Markdown

A PR has been generated to the instance repo:
scverse/cookiecutter-scverse-instance#138

You can check out the PR to preview your changes
in an instance of the cookiecutter template. The PR will be kept in sync with
this PR automatically.

Comment thread biome.jsonc Resolved
@flying-sheep
flying-sheep requested review from Zethson and grst July 30, 2024 09:14
Comment thread biome.jsonc Resolved
@grst

grst commented Jul 30, 2024

Copy link
Copy Markdown
Collaborator

I like it in principle! Shall we wait a bit longer until the biome-pre-commit and pyproject-fmt are maturing a bit more?
How likely is it that pyproject-fmt will become part of ruff?

@flying-sheep

Copy link
Copy Markdown
Member Author

Shall we wait a bit longer until the biome-pre-commit and pyproject-fmt are maturing a bit more?

I think pyproject-fmt is mature enough, for biome-pre-commit we should maybe wait until someone replies to my comment in biomejs/pre-commit#5

How likely is it that pyproject-fmt will become part of ruff?

it’s a completely separate rust project, and targets a different type of file, so maybe not that likely?

but then again the ruff people have adopted uv and rye so who knows!

@flying-sheep

flying-sheep commented Aug 23, 2024 •

Copy link
Copy Markdown
Member Author

Moved the biome part of this to #304

@flying-sheep flying-sheep changed the title Update formatters TOML formatting using pyproject-fmt Aug 23, 2024
@flying-sheep
flying-sheep marked this pull request as ready for review August 23, 2024 10:44
@flying-sheep
flying-sheep requested a review from grst August 23, 2024 10:44

@grst grst left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd (slightly) prefer this one over taplo - In addition to the reasons you mentioned it

  • doesn't require another .<formatter> config file
  • seems to do more stuff that's specific to pyproject.toml, but useful (such as sorting dependencies)

@flying-sheep

flying-sheep commented Aug 25, 2024 •

Copy link
Copy Markdown
Member Author

OK! Do you think we should leave it unconfigured (2 spaces indent) or add

[tool.pyproject-fmt]
indent = 4

for the taplo branch, I configured it because the diff would be minimal, but this PR will probably result in

  1. the cruft sync failing in all repos using this
  2. the pre-commit autofixing reformat the pyproject.toml entirely anyway

This was referenced Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TOML formatting

2 participants