Open laserson opened 5 years ago
Can you give me a bit more information about this? What version of atom and black. What settings you are using?
Thanks Mike
Black is 18.9b0
. I'm new to the Atom ecosystem, and I'm not sure how to give you any logs about what is happening.
Yeah, it's doing the same for me too. It'll chop off the top half or bottom half of a file sometimes. Makes my code completely invalid.
Atom: 1.33.0 x64 Mac OSX
Plugin: python-black 0.7.0
Black version: 18.9b0
Reformatting seems to work perfectly in the command-line, but when I use Atom to do it, it mangles my code.
I've had a go at recreating this and so far I cannot. Can you supply me with an example file that it breaks with? Also please let me know what settings you've got for the black plugin.
Cheers Mike
The file that breaks is this one: https://github.com/AgoraMUD/AgoraMUD/blob/room-movement/libs/account.py
Here are my settings:
Default: black
True
79
Show until dismissed
False
False
Enable
(ctrl-alt-c to format)(Well, one of the files anyway.)
I have the same problem. One of my python scripts has ~ 2000 lines, after I formatted with Black Pack (Alt + Ctrl + C), the script only has ~ 200 lines.
My setup:
I have the same issue with almost the same config
Atom: 1.33.0 x64 Mac OSX
Plugin: python-black 0.7.0
Black version: 18.9b0
Just a bump to say this is still a problem. The file I was editing had ~300 lines, and goes down to <100 lines after running Black.
EDIT: Seeing how this project appears dead, my solution was to switch to atom-beautify. Since atom-beautify doesn't support configuring many Black options, I just edited the Black library locally to have the default configuration I wanted.
Yup! Bump again - this just happened to me. Switching to something else
It requires a couple undo commands to recover the text. Using the latest 0.7.0 in Atom 1.32.2.