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

Do not add an extra blank line to an import line that has fmt disabled #3610

Merged
merged 3 commits into from Mar 18, 2023

Conversation

yilei
Copy link
Contributor

@yilei yilei commented Mar 17, 2023

Description

Fixes #3438.

This isn't put in preview style because:

  1. Already formatted code always has the extra blank line, so it shouldn't change already formatted code and doesn't violate the stability policy.
  2. This unblocks us from upstreaming the incremental formatting patches in Pyink, and we don't want to require --preview (in at least in 2023) to use this feature. It would also make integrations with IDEs / pre-commit harder if we require --preview.

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 reports zero changes comparing this PR (c7fa452) to main (fc6cea0).


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

@JelleZijlstra JelleZijlstra merged commit 268dcb6 into psf:main Mar 18, 2023
44 checks passed
@JelleZijlstra JelleZijlstra mentioned this pull request Mar 18, 2023
@yilei yilei deleted the fmtskip branch March 19, 2023 04:14
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.

Black adds an extra blank line to an import line that ends with # fmt: skip
2 participants