-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[feature-request] Config inheritance #1055
Comments
Yeah, agree with the issue summary. (The discussion around presets would also be relevant here: #809.) I'd like it to be explicit and opt-in, like ESLint's The trickiest part is that we'd then have to use different settings for different files within a single |
By the way: thanks for all the thoughtful and well-written issues. I also realized this morning that you wrote the Dagster article on type migrations, which I enjoyed a lot. Great to have you hanging around the Ruff repo. |
Thanks-- yeah I've done a lot over the past 24 hours assessing |
This is going out in v0.0.178. For now, at least, it's explicit via |
In monorepos, it can easily happen that some section of the codebase needs to maintain consistency with the rest of the code but vary in one dimension. For example, in Dagster we use a line length of 100, but shorten it to 88 for our
docs-snippets
package, which includes code snippets that are incorporated into built docs. The shorter length is to ensure readers don't need to scroll horizontally when reading a code block in the browser.We're currently maintaining a separate
pyproject.toml
file indocs-snippets
where we duplicate most of the configuration in our rootpyproject.toml
for black and isort, just so that we can change the line length. This is because neither of these tools offers any mechanism I'm aware of for config inheritance, which would allow only overriding specific settings.But it would be great to have-- for ruff, it might look something like this:
That's just a suggestion, I haven't thought about how best to implement this-- but some generic extension/inheritance mechanism for config would be useful. Eslint might be a good place to gain inspiration.
The text was updated successfully, but these errors were encountered: