google / google/yapf

Add option to remove blank lines between function docstring and code

Open
#717 1 comment 7 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

I'd like to suppress blank lines between a function's docstring and its code:

```
def foo(x, y):
"""
Do awesome stuff.
"""

return x + y
```

should be formatted as

```
def foo(x, y):
"""
Do awesome stuff.
"""
return x + y
```

Perhaps an option like `BLANK_LINE_AFTER_FUNCTION_DOCSTRING` (cf. #716).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.