google / google/yapf

W504: yapf formatting is incompatible with default settings of latest flake8 3.6.0

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

Description

It seems that code formatted by yapf would not pass flake8 3.6.0 checking and fixing flake8 would break yapf, making the tools incompatible.

It worth mentioning that flake8 adopted the recently updated PEP8 rules which reverted some recomandations about new line wrapping W503/W504 to be more precise.

I think that yapf should assure than in its default settings it would not conflict with the current rules defined by PEP8 (indirectly it should be compatible with flake8).

Some other new line wrapping breakages:
```
def test_memory(host):
- total_memory = host.ansible("setup")['ansible_facts'][
- 'ansible_memtotal_mb']
+ total_memory = host.ansible(
+ "setup")['ansible_facts']['ansible_memtotal_mb']
```

One is ok for flake8, the other for yapf.

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.