Make context manager examples in future style docs consistent (#3274)
This commit is contained in:
parent
75d5c0e3fb
commit
4c99900236
@ -23,10 +23,10 @@ So _Black_ will eventually format it like this:
|
|||||||
|
|
||||||
```py3
|
```py3
|
||||||
with \
|
with \
|
||||||
make_context_manager(1) as cm1, \
|
make_context_manager1() as cm1, \
|
||||||
make_context_manager(2) as cm2, \
|
make_context_manager2() as cm2, \
|
||||||
make_context_manager(3) as cm3, \
|
make_context_manager3() as cm3, \
|
||||||
make_context_manager(4) as cm4 \
|
make_context_manager4() as cm4 \
|
||||||
:
|
:
|
||||||
... # backslashes and an ugly stranded colon
|
... # backslashes and an ugly stranded colon
|
||||||
```
|
```
|
||||||
@ -40,10 +40,10 @@ following way:
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
with contextlib.ExitStack() as exit_stack:
|
with contextlib.ExitStack() as exit_stack:
|
||||||
cm1 = exit_stack.enter_context(make_context_manager(1))
|
cm1 = exit_stack.enter_context(make_context_manager1())
|
||||||
cm2 = exit_stack.enter_context(make_context_manager(2))
|
cm2 = exit_stack.enter_context(make_context_manager2())
|
||||||
cm3 = exit_stack.enter_context(make_context_manager(3))
|
cm3 = exit_stack.enter_context(make_context_manager3())
|
||||||
cm4 = exit_stack.enter_context(make_context_manager(4))
|
cm4 = exit_stack.enter_context(make_context_manager4())
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user