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 doesn't add newline when formatting #13692
Comments
Hi @SyntaxErr0rr, thank you for reaching out. Does Black add a newline if you run it directly from the terminal using the same command as the Python extension (which you can see in the If it adds a newline when run directly in the terminal, which version of Black are you using? Note: you can also use the Thanks! |
Thanks for your response! When I run Black from the command line, it adds the newline to my file. Currently I am using Black, version 20.8b1. An additional note if I didn't mention it when I opened this issue, I have format on save turned on (hope this is useful in solving the problem). |
Thank you for the newline setting as well! |
Could you copy here the output from running |
We use the Closing since this is an issue caused by Black, and not the extension. |
Issue Type: Bug
Whenever I format with black, it doesn't add a newline at the end of my file.
Steps to Reproduce:
If I switch to autopep8, it adds the newline at the end of the file as per the conventions of python formatting. Black used to add newlines but not anymore. I am also using a virtual environment.
Extension version: 2020.8.105045
VS Code version: Code 1.48.2 (a0479759d6e9ea56afa657e454193f72aef85bd0, 2020-08-25T10:09:08.021Z)
OS version: Darwin x64 19.6.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: