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

lint.exclude and format.exclude don't respect --force-exclude #8391

Closed
charliermarsh opened this issue Oct 31, 2023 · 0 comments · Fixed by #8393
Closed

lint.exclude and format.exclude don't respect --force-exclude #8391

charliermarsh opened this issue Oct 31, 2023 · 0 comments · Fixed by #8393
Assignees
Labels
bug Something isn't working cli Related to the command-line interface

Comments

@charliermarsh
Copy link
Member

No description provided.

@charliermarsh charliermarsh added bug Something isn't working cli Related to the command-line interface labels Oct 31, 2023
@charliermarsh charliermarsh self-assigned this Oct 31, 2023
charliermarsh added a commit that referenced this issue Oct 31, 2023
## Summary

We typically avoid enforcing exclusions if a file was passed to Ruff
directly on the CLI. However, we also allow `--force-exclude`, which
ignores excluded files _even_ if they're passed to Ruff directly. This
is really important for pre-commit, which always passes changed files --
we need to exclude files passed by pre-commit if they're in the
`exclude` lists.

Turns out the new `lint.exclude` and `format.exclude` settings weren't
respecting `--force-exclude`.

Closes #8391.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the command-line interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant