-
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
[tool.ruff.lint.flake8-tidy-imports] rules in pyproject.toml parent are ignore pyproject.toml child file #14822
Comments
Can you expand on what you mean and maybe share an example python file? That would help me reproduce the issue and, in turn, help you. |
Sure. in the following folder structure
test.py from typing import List Using the following configuration ./pyproject.toml
And ./folder_a/pyproject.toml
The error on importing Note that if Let me know if it's clearer with the following explanation. |
I think this is an expected behavior because the |
Ok but is there a way in that case to merge the We want to avoid duplicated rules accross different configuration files. Should be present in only config file and spread accross various sub_folder |
I don't think that's currently possible, and we're aware of this limitation in Ruff's current configuration schema. The problem is that merging the options now makes it impossible to override the The solution to this is that we introduce a new sentinel value: "unset" or add a "level" setting to it that can be "ignore", "warn" or "error" so that a sub-configuration can remove (disable) a previous banned api override This is related to #9872 |
Rules present in pyproject.toml parent file are ignored in the child file one.
Example given
./pyproject.toml
./folder_a/pyproject.toml
Typing check are not considered when running
poetry ruff check .
in the folder_aThe text was updated successfully, but these errors were encountered: