-
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
Question on forcing black to put one parameter per line #737
Comments
Yes, I am actually surprised that this isn't something black does considering it resulting diff is cleaner. I'm curious to known what the maintainers of black think. |
I understand where you're coming from and this is somewhat related to the discussion in #747. If you're asking for my personal opinion, I prefer what black currently does because
|
@zsol , thank you for your response. |
for 2. it really depends how much is changed , if you're refactoring an attribute name used accross your code-base it can significantly increase the diff for 1 i beg to disagree that having to manually parse yourself where are the |
I just got one case where I think black is plain wrong
black insists on converting it to
here black prevents me from documenting correctly code :( |
#826 should address this. |
This is partially addressed already but needs refinement. We'll address the rest of the concerns here with #1288. |
Operating system:
Python version: Linux
Black version: 18.9b0
Does also happen on master: master was not working at the moment this ticken was written :/
Currently we want to format our code as this
as we agree to black arguments as exposed in your readme:
https://github.com/ambv/black#how-black-wraps-lines
however black force to reformat this as such
that become inconsistent in the following case
the second one get reindented in one line, with arg2 at the end, making it very easy to miss it while scanning with the eye
moreover it means that replacing val2 by a little longer string, will suddenly cause unwanted reindentation (which can create a snowball effect in a big diff that rename a variable into one with a longer name)
To summarize the main problem is that black is quite strict, but it does not let you be stricter than him :/
The text was updated successfully, but these errors were encountered: