You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a look on this page. I seems that the majority of languages use the first formatting (?).
In my opinion, the first formatting is by far more readable because I can see the object and the methods applied from top to bottom.
The second formatting requires me to move my eyes to the right to see the first method, and then back to the left to see the remaining method(s). #3364 also suggests that there are other people who definitely prefer the first option.
However, some people might have a different opinion on that and I've seen both styles used. I think this issue is comparable to string formatting. Since blacks also allows an option to use “single quotes for data, double quotes for human-readable strings" (see here) I wonder whether it would be possible to create an option to allow the previous formatting?
The text was updated successfully, but these errors were encountered:
Consider the fluent interface
At the moment, black formats this into
The reason for the decision to put the first method call on the first line is unclear to me.
The docs only refer to https://en.wikipedia.org/wiki/Fluent_interface.
I had a look on this page. I seems that the majority of languages use the first formatting (?).
In my opinion, the first formatting is by far more readable because I can see the object and the methods applied from top to bottom.
The second formatting requires me to move my eyes to the right to see the first method, and then back to the left to see the remaining method(s).
#3364 also suggests that there are other people who definitely prefer the first option.
However, some people might have a different opinion on that and I've seen both styles used. I think this issue is comparable to string formatting. Since blacks also allows an option to use “single quotes for data, double quotes for human-readable strings" (see here) I wonder whether it would be possible to create an option to allow the previous formatting?
The text was updated successfully, but these errors were encountered: