Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt: respect one-liner if expressions even when an else is present #6733

Open
anderseknert opened this issue May 3, 2024 · 0 comments
Open

Comments

@anderseknert
Copy link
Member

Whether else should be moved to a line of its own at all is debatable, but I think the formatter at minimum should respect simple one-liner constructs when else is involved:

This:

foo if input.bar else := false

Currently formats to this:

foo if input.bar

else := false

Which just makes the else look entirely detached from the if.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant