Skip to content

Comments

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

Merged
JelleZijlstra merged 3 commits intopsf:mainfrom
yilei:fmtskip
Mar 18, 2023
Merged

Do not add an extra blank line to an import line that has fmt disabled#3610
JelleZijlstra merged 3 commits intopsf:mainfrom
yilei:fmtskip

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