-
Notifications
You must be signed in to change notification settings - Fork 55
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
Bugfix black .gitignore usage #515
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change should indeed change the behaviour, see https://github.com/psf/black/blob/35ce37ded7bd8fdd3950af19e7c11f311ee7b8d8/src/black/files.py#L361-L370
This is great, thanks @jedie and @MatthijsBurgh. Three questions come to mind:
|
I checked the blame, I think the the minimal required version of black is 21.5b1. Currently it is on 21.7b1, so fine. |
564c100
to
15da388
Compare
15da388
to
1a34b82
Compare
1a34b82
to
4363e56
Compare
I wrote three unit tests, matching the three different versions of Actually |
It's ok for the future test to fail. Updating Black to 24.2 and beyond is now prevented for Darker 1.7.x, and version 1.8.0 will fix this compatibility issue and allow newer Black versions again. |
Black didn't use the
.gitignore
file, becausegen_python_files()
will be called withgitignore_dict=None
andNone
will disable the.gitignore
usage.see: #323 (comment)
Fixes #490.