-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Doesn't honor extend-exclude for nested file #3754
Comments
The extend-exclude config is meant to be a str, not a list. The error message here could obviously be much better. |
@hauntsaninja Thanks, let me try that. Do you've any comment on the other thing I mentioned above?
|
Nah, this doesn't work too. No error, but the file |
@hauntsaninja How does improving the error message fix the issue where the exclude doesn’t work at all? |
You might want to be a little nicer to volunteers. Your regex is probably broken:
Works fine for me:
|
And on this one:
I don't think that's a good idea. People might exclude files from different tools for different reasons, and it is likely to be confusing if configuration for one tool magically affects another. |
Describe the bug
Given the following configuration in
pyproject.toml
Black fails with the error:
But this is a valid regex that's supposed to match any files starting or ending in
test
or files in a directory namedtest
. For example, the following path matches thetest
directory:myapp/folder/test/test_something.py
To Reproduce
I guess use the regex in a unit test that parses it?
Expected behavior
It should work. It would be even better if Black could use the
extend-exclude
list from flake8 or mypy, so that I don't have repeat it. The documentation only shows themax-line-length
property.Environment
The text was updated successfully, but these errors were encountered: