google / google/yapf

[Bug] Some space out of range strip when using `-l` argument.

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

Description

```
def do_something():
xs = []
for x in xs:
y = 'y'

if y:
pass

def do_something_else():
return '-path 1'
```
the line 5 (one-based) has 8 spaces or 2 tabs. they are strip when I run `yapf -l 10-10 xx.py -i` or `cat xx.py | yapf -l 10-10`. line 10 is the last line.

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.