google / google/yapf

Not fixing E301

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

Description

Running yapf, It seems to not fix ```E301``` when there's a docstring over a method. In fact, running the formatter removes the space if one manually adds it.

For example:
```
class MyClass(SuperClass):
"""Helper."""

TUPLE = (6, 8)
"""
Args:
Random Docsstring:
"""

def __init__(self, params):
super().__init__()
self.params = params

```
Giving the above will make yapf remove the blank line above ```__init__```. Yapf should also add a blank line above ```__init__``` if there is none.

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.