google / google/yapf

hanging indent and pylint (PEP8)

Open
#769 8 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

pylint doesn't like this indentation -- the 2nd line should be indented an additional 4 spaces:
```python
if (node.children[0].type == token.AWAIT or
(node.children[0].type == token.NAME and xcast(Leaf, node.children[0]).value == 'await')):
atom_child, *trailer_factor_children = node.children[1:]
```
I couldn't see any option for setting hanging indent -- `continuation_indent_width` doesn't do what I want.

Here's another example that pylint doesn't like -- the 2nd line should be indented an additional 4 spaces:
```python
def _as_prolog_str_full(
value: Union[PlainOldData, List[Any], bool, str, int, Dict[Any, Any], None, Exception]
) -> str:
"""Recursively turn an object into a Prolog term."""
```

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.