-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
formatterRelated to the formatterRelated to the formatter
Description
We have a few nodes that are separated by a keyword. For example:
with (x as y) # x and y are separated by the as keyword
except x as e: # Same
call(a, b) # a and b are separated by a comma
...It would be nice if we could unify the comment placement logic for all of these.
i wonder if an abstraction with two nodes with a single token in between makes sense, which would also force us to handle them consistently. We have the same pattern in slices (x[a:b]), argument lists x(a,b) and binary expressions (a+b). (also this feature is inconsistent because with (a as b) works but except (a as b) doesn't).
Original Message from @konstin
This task aims to explore if generalizing the logic is possible and, if so, implement the generalization.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formatter