-
Notifications
You must be signed in to change notification settings - Fork 288
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 line break on slice notation #281
Comments
In my opinion the output should be:
|
@spaceone you can have it even now with more aggressive settings and/or experimental - so your option is already there. |
@tobixx Ah really? Too bad, that I didn't knew this a week ago. I autopep8'ed about 30000 files. |
@spaceone yes - one additionaly '-a' is already enough. (just tried it) |
After looked into 139 test for the E501 : ignore all my nice to have wishes ^^ |
@tobixx I don't get the option with aggressive/experimental to work:
produces
What I want is:
Do you think there is a chance to get this output? |
@spaceone At least not in the place I modified it. There only a rank is determined where to break a long line, but in your case there is really nothing to fix (in terms of pep8) anything at all - because you don't even hit the trigger - your line is already short enough. Even if it would kick in for your example, there is nowhere your most liked solution calculated as a candidate. The nearest solution would also break up the list in it - which is probably not the thing you want. This would be probably fixable, but in the end we again talk about a style according to an personal opinion instead of only fixing pep8 stuff. Well, I also want it, but this seems to be absolutely overkill for this tool - at least the name then does not cover it anymore ;-) |
In this concrete example it is a line break in middle of accessing an dictionary member,like general:
dict_object[key]
turns intodict_object[\nkey]
--select=E501
Personally I would prefer the even length distributed parameter solution (nr. 6), but not nr.4 - just saying. Anyway this is just an opinion . But the first selection is a no-go. Maybe an option for an preferred user strategie would be a good idea - but hard. At least a prevention of the shown break. Nice would be something like "filLinesfromBeginning" because as shown the order prefers "fillLinesAtTheEnd".
9. yes
The text was updated successfully, but these errors were encountered: