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
Pdb breakpoint line unnecessarily get formatted #435
Comments
work around for python 3.7: use |
It's unlikely we're going to make an exception for |
I agree with @pavdmyt that this would be nice to accomplish. Now I'm debugging some code, I add the pdb one liner and save, find the bug, and with the editors remove line functionality am clean again. With black that breaks up the workflow. I tried changing my pdb snippet into Could we make single line escaping work then? That would allow this (quite common for me and my colleagues at least) workflow. |
@tino -- What you want is the following:
I've turned this into a snippet in VSCode so that all I have to do is type "pdb" as a prefix. You could do the same in your IDE for ease of use. |
black will not touch this workaround
|
Since GH-1800 on the master branch, |
The breakpoint set using
pdb
:import pdb; pdb.set_trace()
get formatted into 3 lines:I'm using Atom editor with plugin to apply black when saving the file. 3 lines instead of single breakpoint line is not very convenient. Maybe it is possible to add an exclusion for such kind of lines?
Environment:
Operating system: macOS High Sierra; Version 10.13.6 (17G65)
Python version: 3.6.5
Black version: 18.6b4
Does also happen on master: yes
The text was updated successfully, but these errors were encountered: