google / google/yapf

continuation_indent_width is ignored, when use_tabs is True

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

Description

I'm trying to follow the [BSD style(9)](https://man.freebsd.org/cgi/man.cgi?query=style&sektion=9) guide even when using languages other than C. One particular aspect of that standard is that, although hierarchical indentation uses tabs, the line-continuation is done with four spaces.

Unfortunately, with `use_tabs=True` yapf seems to ignore the `continuation_indent_width=4` -- indenting things like long function-calls with tabs too:
```python
p = subprocess.run(call_args,
stderr = subprocess.PIPE,
stdout = subprocess.PIPE,
timeout = timeout)
```
instead of:
```python
p = subprocess.run(call_args,
stderr = subprocess.PIPE,
stdout = subprocess.PIPE,
timeout = timeout)
```
Can anything be done about this, please?

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.