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
In Python's black formatter, adding a trailing comma to a tuple ensures that each element is formatted on a separate line. This feature greatly enhances readability for multi-line collections, especially when dealing with large datasets or complex structures.
For example:
# Without trailing commamy_tuple= ("item1", "item2", "item3")
# With trailing commamy_tuple= (
"item1",
"item2",
"item3",
)
I would like to request a similar feature in Runic, where trailing commas can dictate line-breaking behavior for collections (e.g., tuples, lists, dictionaries, function arguments). This would align with common formatting standards and improve the readability of formatted code.
Use Case
Working with collections that contain many elements.
Writing clean and easily reviewable code in collaborative environments.
The text was updated successfully, but these errors were encountered:
Runic currently doesn't do much line breaking (#61). The two styles you suggest here are already accepted by Runic so you can manually format it like this (or write an editor macro to do it for you). Even if Runic does line breaking in the future I don't think doing it based on such a suble thing (,) is very nice and I don't think Runic would put one item per line anyway, but rather use as much of the line as permitted.
Description
In Python's black formatter, adding a trailing comma to a tuple ensures that each element is formatted on a separate line. This feature greatly enhances readability for multi-line collections, especially when dealing with large datasets or complex structures.
For example:
I would like to request a similar feature in Runic, where trailing commas can dictate line-breaking behavior for collections (e.g., tuples, lists, dictionaries, function arguments). This would align with common formatting standards and improve the readability of formatted code.
Use Case
The text was updated successfully, but these errors were encountered: