forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-editor-*User-facing catch-allUser-facing catch-allarea-formattingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
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
)
tommilligan-plutoflume, uriva, dylan-kerr, drorata, mjbcopland and 13 more
Metadata
Metadata
Assignees
Labels
area-editor-*User-facing catch-allUser-facing catch-allarea-formattingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug