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

Default isort.split-on-trailing-comma to format.skip-magic-trailing-comma #9006

Open
sbrugman opened this issue Dec 5, 2023 · 1 comment
Labels
configuration Related to settings and configuration needs-decision Awaiting a decision from a maintainer

Comments

@sbrugman
Copy link
Contributor

sbrugman commented Dec 5, 2023

For our PyCodeHash project we have turned magic trailing comma off:

[tool.ruff.isort]
split-on-trailing-comma = false

[tool.ruff.format]
skip-magic-trailing-comma = true

Now I see that in this commit we default max-positional-args to max-args.

What do you think about defaulting isort.split-on-trailing-comma to format.skip-magic-trailing-comma (or vice versa)?

@MichaReiser
Copy link
Member

Hy @sbrugman

I can see how keeping the two settings consistent can be annoying.

We do inherit values in other places but so far only from top-level to a tool specific configuration and not across different tools, because we could only inherit one way (isort from format, or format from isort) or explaining the default value might get confusing.

What we have done so far is to make tool specific options global options with tool-specific overrides (which may not even be necessary?). The downside of this is that it complicates configuration inheritance (using extends) and it may result in many global options.

That's why I'm not sure what the best approach here is, but I agree that having a consistent solution for this kind of problem would improve usability.

@dhruvmanila dhruvmanila added configuration Related to settings and configuration needs-decision Awaiting a decision from a maintainer labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration needs-decision Awaiting a decision from a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants