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 won't trim two lines at end of file #14591

Closed
hochreitercorpuls opened this issue Nov 2, 2020 · 2 comments
Closed

Black won't trim two lines at end of file #14591

hochreitercorpuls opened this issue Nov 2, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@hochreitercorpuls
Copy link

hochreitercorpuls commented Nov 2, 2020

Environment data

  • VS Code version: 1.50.1
  • Extension version (available under the Extensions sidebar): 2020.10.332292344
  • OS and version: Windows 10 19042.572
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.5 (Anaconda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: black 19.10b0
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): disabled
  • Black arguments: "python.formatting.blackArgs": []

Expected behaviour

given a python file like this (with 2+ lines at the end of the file):

import numpy as np

def test():
    return 0




I would expect black to format it to a file like this:

import numpy as np


def test():
    return 0

instead all lines but two at the end of the file are being trimmed.

import numpy as np


def test():
    return 0

So not exactly what you would expect.

@hochreitercorpuls hochreitercorpuls added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Nov 2, 2020
@hochreitercorpuls
Copy link
Author

Probably related to this #11001

@karthiknadig karthiknadig self-assigned this Nov 2, 2020
@karthiknadig
Copy link
Member

The cause for this is same as #11001. closing as duplicate.

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Nov 2, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants