#Happy to help with this and support
1 messages · Page 1 of 1 (latest)
thanks! how hard would it be to allow multiple --config?
that way the first one can be whatever the user has and the second one can be the predefined stuff
Ah so one is like the base configuration and the other is overrides?
true, rather maybe a --default-config instead
It depends on the semantics
--default-config has been asked for a few times
But it depends on whether the overrides are "merged in" or supersede the defaults
Like in one case, you use the default unless you have a user config; in the other, the user config is overriding select options on the defaults
the latter
for example this is always project-specific:
[tool.ruff.isort]
known-first-party = ["..."]
Okay so like a deep merge
It's a little bit of a specific question, but would you expect to have other keys in the isort section that you'd want preserved from the "parent" config?
(Back in a bit)
I would expect the behavior of Hatch regarding pyproject.toml vs hatch.toml where top level keys in the former simply override those in the latter
it's way simpler to implement and imo easier to reason about
Yeah that’s a bit easier
Or a lot easier, I guess
I am shocked by how much work it is to implement configuration
oh it looks like I got the precedence backwards but the implementation is the same https://hatch.pypa.io/latest/intro/#configuration
Modern, extensible Python project management
I'm glad I document everything lol
so yeah the top level keys of the default config would simply be overwritten by user config
this I think actually works really well for Ruff because the config is so flat with every component having its own section