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

toml-sort breaks ruff config by removing tool.ruff. prefix from sections #69

Open
ssbarnea opened this issue May 7, 2024 · 1 comment

Comments

@ssbarnea
Copy link

ssbarnea commented May 7, 2024

Ruff made some config changes that required adding .lint but to some options. Once you do this, when toml-sort runs, it introduces some breaking changes by removing the prefixes:

x

I was not able to find any config option that might prevent this from happening so I was forced to disable the hook for the moment.

@dorschw
Copy link

dorschw commented Jul 24, 2024

adding a [tool.ruff.lint] header fixed it for me:

[tool.ruff]
- lint.ignore = ["F403"]
+ [tool.ruff.lint]
+ ignore = ["F403"]

not sure if it's just a workaround, or whether a toml with key [a.b] and then [a.b.c.d] without a middle [a.b.c] is invalid.

P.S the happened to me with macisamuele/language-formatters-pre-commit-hooks as well.

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

No branches or pull requests

2 participants