X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/6e97c5f47cbec72c72c27aefb206589dd84707a7..e3c9b0430eae5de35fdbeed047f9b2f07f9b78de:/docs/the_black_code_style/future_style.md diff --git a/docs/the_black_code_style/future_style.md b/docs/the_black_code_style/future_style.md index 2ec2c03..8d159e9 100644 --- a/docs/the_black_code_style/future_style.md +++ b/docs/the_black_code_style/future_style.md @@ -49,3 +49,28 @@ plain strings. User-made splits are respected when they do not exceed the line l limit. Line continuation backslashes are converted into parenthesized strings. Unnecessary parentheses are stripped. The stability and status of this feature is tracked in [this issue](https://github.com/psf/black/issues/2188). + +### Removing trailing newlines after code block open + +_Black_ will remove trailing newlines after code block openings. That means that the +following code: + +```python +def my_func(): + + print("The line above me will be deleted!") + + print("But the line above me won't!") +``` + +Will be changed to: + +```python +def my_func(): + print("The line above me will be deleted!") + + print("But the line above me won't!") +``` + +This new feature will be applied to **all code blocks**: `def`, `class`, `if`, `for`, +`while`, `with`, `case` and `match`.