google / google/yapf

Unexpected space after keyword argument

Open
#393 4 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 --style=pep8` formats the following code:

```python
class ConjectureRunner(object):

def _(
self, test_function, settings=None,
):
self.settings = ConjectureData(
draw_bytes=lambda data, n, distribution:
distribution(self.random, n)
)
```

as the following output:

```python
class ConjectureRunner(object):
def _(
self,
test_function,
settings=None, ):
self.settings = ConjectureData(
draw_bytes=
lambda data, n, distribution: distribution(self.random, n))
```

The space after "settings=None," seems to be incorrect according to pep8 (both my interpretation of it and the pycodestyle checker's claim).

I've verified this both with yapf 0.16.1 and the current version in da3697c012016665b9fc537ce694bbc5bc7101dd

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.