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
Black should not split conditions in assert statements over multiple lines unless necessary. Instead, it should split the assert error message over multiple lines.
Given a long assert statement such as this:
assert type(queryset) in (ModelBase, QuerySet), "You must specify a model or override the class 'queryset'."
Based on the current style black reformats it like this:
assert type(queryset) in (
ModelBase,
QuerySet,
), "You must specify a model or override the class 'queryset'."
Instead, I believe it would look much better if it were formatted like this:
assert type(queryset) in (ModelBase, QuerySet), (
"You must specify a model or override the class 'queryset'."
)
The text was updated successfully, but these errors were encountered:
I think this boils down to predicting whether the items in the list will change in the future. Having them eachin one line helps reduce diff flickering, thus helps automatic versioning merges, and also (in some inferior editors) makes it easier to sort the list.
Black should not split conditions in
assert
statements over multiple lines unless necessary. Instead, it should split theassert
error message over multiple lines.Given a long
assert
statement such as this:Based on the current style black reformats it like this:
Instead, I believe it would look much better if it were formatted like this:
The text was updated successfully, but these errors were encountered: