google / google/yapf

Tabs replaced with spaces outside of `--lines` range

Open
#336 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

Hi! Another issue like #318:

In the following example, yapf replaces the tab with spaces even if it's not included in the range specified by `--lines`:

import sys

if True:
print("Hello, world" ) # Indented with a tab

[run `yapf test.py --lines=1-1`]

import sys

if True:
print("Hello, world" ) # Indented with a tab

The double space between `import` and `sys` has been correctly fixed, and the extra space between `"Hello, world"` and `)` has been correctly ignored, but the `print()` is now indented with spaces rather than tabs.

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.