Skip to content

Commit 49b1108

Browse files
committed
Address documentation related PR comments
1 parent f9bd6ef commit 49b1108

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Doc/library/pprint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ PrettyPrinter Objects
220220
.. versionchanged:: 3.11
221221
No longer attempts to write to :data:`!sys.stdout` if it is ``None``.
222222

223-
.. versionchanged:: 3.13
223+
.. versionchanged:: next
224224
Added the *block_style* parameter.
225225

226226

Doc/whatsnew/3.14.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,15 @@ platform
673673
(Contributed by Bénédikt Tran in :gh:`122549`.)
674674

675675

676+
pprint
677+
-----
678+
679+
* Add a *block_style* keyword argument for :func:`pprint.pprint`,
680+
:func:`pprint.pformat`, :func:`pprint.pp` by passing on all *kwargs* and
681+
:class:`pprint.PrettyPrinter`.
682+
(Contributed by Stefan Todoran in :gh:`129274`.)
683+
684+
676685
pydoc
677686
-----
678687

Lib/test/test_pprint.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from collections import UserDict, UserList
1919
from dataclasses import dataclass, field
2020
from types import SimpleNamespace, MappingProxyType
21-
from typing import Optional
2221

2322
# list, tuple and dict subclasses that do or don't overwrite __repr__
2423
class list2(list):
@@ -1143,7 +1142,7 @@ class DummyDataclass:
11431142
quux: list = field(default_factory=list)
11441143
corge: int = 1
11451144
garply: tuple = (1, 2, 3, 4)
1146-
waldo: Optional["DummyDataclass"] = None
1145+
waldo: "DummyDataclass" | None = None
11471146
dummy_dataclass = DummyDataclass(
11481147
foo="foo",
11491148
bar=1.2,

0 commit comments

Comments
 (0)