google / google/yapf

Ending blank lines always reformatted no matter --lines args

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

Description

Clarification of issue #746. Any trailing blank lines are deleted. This should not be the case when they aren't in any of the ranges mentioned by the '--lines' argument.

Running `yapf -l 1-2` on:
```python
a = 4
b = 5

```
deletes lines 3-4 and gives
```python
a=4
b=5
```
instead of the expected original file.

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.