Skip to content

How to format short content into single line? #12983

Answered by MichaReiser
failable asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks. You want to ignore COM812 because it enforces trailing commas everywhere. So what's happening is that COM812 fixes your code to

print(
    a,
    b,
)

Zed then runs the formatter and the formatter sees the trailing comma, which is why it doesn't collapse the statement

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@failable
Comment options

@MichaReiser
Comment options

@failable
Comment options

@MichaReiser
Comment options

Answer selected by failable
@failable
Comment options

@MichaReiser
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Asking for support or clarification
2 participants