google / google/yapf

yapf disable setting is ignored & breaks formatting

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

using the 0.29.0 release

this code snippet:
```python
def str_ms_flags(flags):
return decode.str_bits(flags, {
MS_ACTIVE: 'active',
MS_NOUSER: 'nouser',
})
```

when using `# yapf: disable`, it reformats incorrectly as:

```python
# yapf: disable
def str_ms_flags(flags):
return decode.str_bits(flags, {
MS_ACTIVE: 'active',
MS_NOUSER: 'nouser',
})
```

using the default style settings here.

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.