google / google/yapf

problem formatting a line with heading spaces

Open
#588 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,
I encountered the following problem when trying to format a file
The file is

```
# a file with the problem
import sys

```

if I change the file to

```
# a file without the problem
import sys

```

The yapf works fine
(The only difference is the spacing before the import sys)

The following file also works fine

```
# a file without the problem
import sys

```

there is no .style.yapf in the folder (or it's ancestors)

The following is the yapf error

[problem_output.txt](https://github.com/google/yapf/files/2194627/problem_output.txt)

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.