-
Notifications
You must be signed in to change notification settings - Fork 14
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
brunette is not changing to single quotes #5
Comments
Is this fixed by #4 or it is a separate issue? |
No, this is a separate issue; hence the different ticket :). I didn't really have an easy way to fix this as I did not dig too deep into how black is working. |
Maybe there's a way to disable that daemon process to avoid this. |
@svaningelgem When I run your example above, single quotes are used to format the files. Can you provide another working example to reproduce this one? |
I run into this problem as well. It's inconsistent though... I'm using pre-commit and occasionally need to uninstall get the commit through then re-install. It's a real PITA. But I've not been able to find any pattern to the behavior. |
I've attached the case that is failing for me. It's a slimmed down set of changes that pre-commit (the executor of brunette) is stumbling over. $ unzip brunette-issue-5.zip
$ cd brunette-issue-5
$ brunette . --config setup.cfg
All done! ✨ 🍰 ✨
4 files left unchanged. |
Correct me if I'm wrong, but this is a critical flaw that can't be fixed... Any monkey patching you do at the start of brunette is lost due to processes being started in the background (all new memory space). Without some cooperation from the black code this can't be solved. Right? |
@mmulich Anything is possible :) This can be updated to just batch the 'black' source code (on disk) worse case, I just don't have time to do it at the moment. Hopefully soon though. |
I put together a small fix for this in #14. But as I mention there, it forces everyone into serial execution mode. Maybe that's not a huge issue... 🤷🏼 |
brunette . --target-version py36 --config setup.cfg
(within the checked out brunette repo).==> All single quotes are changed into double quotes.
Very likely this is because black is starting some kind of daemon process in which the black module is re-loaded... Causing the single-quote implementation you had to be ignored (again).
The text was updated successfully, but these errors were encountered: