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

black removes empty line between imports and overloads in stubs #1490

Closed
srittau opened this issue Jun 11, 2020 · 0 comments · Fixed by #1646
Closed

black removes empty line between imports and overloads in stubs #1490

srittau opened this issue Jun 11, 2020 · 0 comments · Fixed by #1646
Labels
T: bug Something isn't working

Comments

@srittau
Copy link
Contributor

srittau commented Jun 11, 2020

Please consider the follow stub file (e.g. foo.pyi):

import y
  
@overload
def foo(): ...

Running black foo.pyi (no configuration file) removes the empty line 2.

  • Version: 19.10b0
  • OS and Python version: Linux/Python 3.8.3

Does this bug also happen on master?

Using the online formatter: yes.

@srittau srittau added the T: bug Something isn't working label Jun 11, 2020
srittau added a commit to srittau/typeshed that referenced this issue Jun 11, 2020
A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.

In two instances @Overloads at the top of the file needed to be moved
due to psf/black#1490.
srittau added a commit to srittau/typeshed that referenced this issue Jun 14, 2020
A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.

In two instances @Overloads at the top of the file needed to be moved
due to psf/black#1490.
JelleZijlstra pushed a commit to python/typeshed that referenced this issue Jun 14, 2020
A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.

In two instances @Overloads at the top of the file needed to be moved
due to psf/black#1490.
vishalkuo pushed a commit to vishalkuo/typeshed that referenced this issue Jun 26, 2020
A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.

In two instances @Overloads at the top of the file needed to be moved
due to psf/black#1490.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant