Environment data
- VS Code version: 1.23.1
- Extension version (available under the Extensions sidebar): 2018.5.0
- OS and version: macOs High Sierra
- Python version (& distribution if applicable, e.g. Anaconda): CPython 3.6.5
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
- Relevant/affected Python packages and their versions: black-18.6b1
Actual behavior
Formatting using black leaves two empty lines at the end of the file, if the file has more than 1 empty line already.
Expected behavior
Formatting should leave just one line, and this is what happens when I run black manually from the terminal.
Steps to reproduce:
- Open Python file
- Insert 10 empty lines at the end
- Activate "Format document" with black set as the formatter
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
##########Linting Output - flake8##########
20,1,W,W391:blank line at end of file
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
Environment data
Actual behavior
Formatting using black leaves two empty lines at the end of the file, if the file has more than 1 empty line already.
Expected behavior
Formatting should leave just one line, and this is what happens when I run black manually from the terminal.
Steps to reproduce:
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Output from
Consoleunder theDeveloper Toolspanel (toggle Developer Tools on underHelp)