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 line after block open before a comment or compound statement #3967

Merged

Conversation

henriholopainen
Copy link
Contributor

Description

I tried to follow the discussion around empty lines after a block open from issue #3551. From what I gathered from the different issues linked to this, is that Black won't go back to allowing the empty line at block open, but loosening this rule a bit might be beneficial for some users. This PR enables empty lines after a block open for comments (# comments or """comments""") and compound statements, as suggested by @JelleZijlstra. I understand that this is a complicated topic and this change might not be accepted in the end, but just wanted to put this out there, as it seemed like a low-hanging fruit.

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

@github-actions
Copy link

diff-shades results comparing this PR (ebd9677) to main (0a37888). The full diff is available in the logs under the "Generate HTML diff report" step.

╭─────────────────────── Summary ────────────────────────╮
│ 2 projects & 2 files changed / 3 changes [+3/-0]       │
│                                                        │
│ ... out of 2 500 866 lines, 11 760 files & 23 projects │
╰────────────────────────────────────────────────────────╯

Differences found.

What is this? | Workflow run | diff-shades documentation

Copy link
Collaborator

@JelleZijlstra JelleZijlstra 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!

@JelleZijlstra JelleZijlstra merged commit 2db5ab0 into psf:main Oct 23, 2023
40 of 41 checks passed
@henriholopainen
Copy link
Contributor Author

How should the issue be handled? I can't close it, but do you want to keep it open still?

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

Successfully merging this pull request may close these issues.

2 participants