-
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
Long string remains unchanged, can black make them in multine representation [help] #1528
Comments
Black already does wrap long string literals due to #1132. We haven't released a new version yet though, so it only lives in the master branch of this repo. (black) richard-26@ubuntu-laptop:~/programming/black$ black test.py -l 80 --color --diff
--- test.py 2020-07-01 14:36:24.700946 +0000
+++ test.py 2020-07-01 14:36:38.436792 +0000
@@ -1 +1,4 @@
-value = "aldkfdskdksfjdskfj dslkfj sdkl dklsfj dsklfj sdklfjdsklfjdskl fjdskl jdsklf jdsklfj dsklfj dsklfj dsklfj dsklfj dsklfj dsklfj dkl"
+value = (
+ "aldkfdskdksfjdskfj dslkfj sdkl dklsfj dsklfj sdklfjdsklfjdskl fjdskl"
+ " jdsklf jdsklfj dsklfj dsklfj dsklfj dsklfj dsklfj dsklfj dkl"
+)
would reformat test.py
All done! ✨ 🍰 ✨
1 file would be reformatted. |
@ichard26 Thats great! //How could I use the master version? Could I do with following line:
|
|
@cooperlees : Also what should I write into
|
Black has it own custom version output that isn't compatible with git so referencing the exact commit is necessary:
Please note that if you update your pip installed installation of Black. it will be out of sync with your pre-commit version of Black. |
Has this been disabled, or is there a regression? I can't get
to wrap on head. Never mind, it appears this feature is gated behind the hidden flag |
Yeah, we had to hide it under a flag because it was causing way too many crashes. IIRC all of 'em have been fixed and what remains is a significant performance penalty under specific conditions with ESP enabled. See also #2188. |
Before:
After running
black --line-length 80 file.py
: (long string remains unchanged)Expected behavior (something close to this):
or
[Q] Long string remains unchanged, can
python-black
convert them into multine?The text was updated successfully, but these errors were encountered: