google / google/yapf

Strange operator alignment with powers of string literals

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

yapf (tested with 2c13f6f) turns the following:

```python
b"" ** b""
```

into the following:

```python
b"" **b""
```

pycodestyle calls this "E225 missing whitespace around operator" but actually it's fine with either `x**y` or `x ** y` (and the former is what yapf normally produces). The oddity here is that there's whitespace on one side but not the other.

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.