Skip to content

Commit

Permalink
Make context manager examples in future style docs consistent (#3274)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blandes22 authored Sep 23, 2022
1 parent 75d5c0e commit 4c99900
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/the_black_code_style/future_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ So _Black_ will eventually format it like this:

```py3
with \
make_context_manager(1) as cm1, \
make_context_manager(2) as cm2, \
make_context_manager(3) as cm3, \
make_context_manager(4) as cm4 \
make_context_manager1() as cm1, \
make_context_manager2() as cm2, \
make_context_manager3() as cm3, \
make_context_manager4() as cm4 \
:
... # backslashes and an ugly stranded colon
```
Expand All @@ -40,10 +40,10 @@ following way:

```python
with contextlib.ExitStack() as exit_stack:
cm1 = exit_stack.enter_context(make_context_manager(1))
cm2 = exit_stack.enter_context(make_context_manager(2))
cm3 = exit_stack.enter_context(make_context_manager(3))
cm4 = exit_stack.enter_context(make_context_manager(4))
cm1 = exit_stack.enter_context(make_context_manager1())
cm2 = exit_stack.enter_context(make_context_manager2())
cm3 = exit_stack.enter_context(make_context_manager3())
cm4 = exit_stack.enter_context(make_context_manager4())
...
```

Expand Down

0 comments on commit 4c99900

Please sign in to comment.