Skip to content

Commit

Permalink
Move the concatenated string wrapping in paren diff to the "historica…
Browse files Browse the repository at this point in the history
…l" section.

psf#3307 is merged.

PiperOrigin-RevId: 496442325
  • Loading branch information
yilei authored and Copybara-Service committed Dec 19, 2022
1 parent 0ea91b8 commit 0967bf2
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions README.md
Expand Up @@ -83,27 +83,6 @@ patches as possible in the future.
)
```

* Wrap concatenated strings in parens for function arguments (see
[psf/black#3292](https://github.com/psf/black/issues/3292)). Example:

```python
# Pyink:
function_call(
(
" lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor"
" incididunt ut labore et dolore magna aliqua Ut enim ad minim"
),
" veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
)

# Black:
function_call(
" lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor"
" incididunt ut labore et dolore magna aliqua Ut enim ad minim",
" veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
)
```

* Add an empty line between class statements without docstrings, and the first
method. We expect we will simply remove this difference from *Pyink* at some
point. Example:
Expand All @@ -126,6 +105,27 @@ patches as possible in the future.
These are differences that existed in the past. We have upstreamed them to
*Black* so they are now identical.

* Wrap concatenated strings in parens for function arguments (see
[psf/black#3292](https://github.com/psf/black/issues/3292)). Example:

```python
# New:
function_call(
(
" lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor"
" incididunt ut labore et dolore magna aliqua Ut enim ad minim"
),
" veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
)

# Old:
function_call(
" lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor"
" incididunt ut labore et dolore magna aliqua Ut enim ad minim",
" veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
)
```

* Prefer splitting right hand side of assignment statements
(see [psf/black#1498](https://github.com/psf/black/issues/1498). Example:

Expand Down

0 comments on commit 0967bf2

Please sign in to comment.