google / google/yapf

(Bug) Blank lines after inline yapf: disable

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

Python code (2 blank lines).
```[Python]
a = 1
b = 2 # yapf: disable

c = 3
```

Yapf formatting (2 blank lines).
```[Python]
a = 1
b = 2 # yapf: disable

c = 3
```

Expected formatting (1 blank line).
```[Python]
a = 1
b = 2 # yapf: disable

c = 3
```

As you can see inline `yapf: disable` command disable yapf formatting for blank lines below.
I believe this is a bug.

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.