Skip to content

Avoid unstable formatting in ellipsis-only body with trailing comment#8984

Merged
charliermarsh merged 1 commit intomainfrom
charlie/ellipsis
Dec 4, 2023
Merged

Avoid unstable formatting in ellipsis-only body with trailing comment#8984
charliermarsh merged 1 commit intomainfrom
charlie/ellipsis

Conversation

@charliermarsh
Copy link
Member

Summary

We should avoid inlining the ellipsis in:

def h():
    ...
    # bye

Just as we omit the ellipsis in:

def h():
    # bye
    ...

Closes #8905.

@charliermarsh charliermarsh added bug Something isn't working formatter Related to the formatter labels Dec 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2023

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@charliermarsh charliermarsh merged commit 6fe8f8a into main Dec 4, 2023
@charliermarsh charliermarsh deleted the charlie/ellipsis branch December 4, 2023 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working formatter Related to the formatter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unstable formatting in ignore_pyi.pyi

2 participants