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

Allow empty first line after code block with ruff format #11133

Closed
alechouse97 opened this issue Apr 24, 2024 · 2 comments
Closed

Allow empty first line after code block with ruff format #11133

alechouse97 opened this issue Apr 24, 2024 · 2 comments

Comments

@alechouse97
Copy link

I've seen some discussion on here about allowing/not allowing an empty first line after a new code block with ruff format. This was updated to be allowed by black 24+. It also seems that black's removing of the empty new line was only a feature in black 23; previous versions of black did not enforce this.

Is there any willingness to allow these empty newlines in ruff? Or perhaps an optional flag to allow them? I agree with others' opinions that ruff should not format existing code with no new line, but should allow empty new lines.

Thoughts?

@MichaReiser
Copy link
Member

MichaReiser commented Apr 24, 2024

This is a duplicate of #9745. We're considering but have no plans changing this in the short term.

@MichaReiser MichaReiser closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
@alechouse97
Copy link
Author

Appreciate the link

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

No branches or pull requests

2 participants