Skip to content

Commit 4e0b753

Browse files
committed
Update doc string for python 3.12
1 parent 39774df commit 4e0b753

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

docs/usage/convert-version-into-different-types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ It is possible to convert a :class:`~semver.version.Version` instance:
1717

1818
>>> v = Version(major=3, minor=4, patch=5)
1919
>>> v.to_dict()
20-
OrderedDict([('major', 3), ('minor', 4), ('patch', 5), ('prerelease', None), ('build', None)])
20+
OrderedDict({'major': 3, 'minor': 4, 'patch': 5, 'prerelease': None, 'build': None})
2121

2222
* Into a tuple with :meth:`~semver.version.Version.to_tuple`::
2323

docs/usage/create-a-version.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Depending on your use case, the following methods are available:
9090
To access individual parts, you can use the function :func:`semver.parse`::
9191

9292
>>> semver.parse("3.4.5-pre.2+build.4")
93-
OrderedDict([('major', 3), ('minor', 4), ('patch', 5), ('prerelease', 'pre.2'), ('build', 'build.4')])
93+
OrderedDict({'major': 3, 'minor': 4, 'patch': 5, 'prerelease': 'pre.2', 'build': 'build.4'})
9494

9595
If you pass an invalid version string you will get a :py:exc:`ValueError`::
9696

src/semver/version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ def to_dict(self) -> VersionDict:
228228
``patch``, ``prerelease``, and ``build``.
229229
230230
>>> semver.Version(3, 2, 1).to_dict()
231-
OrderedDict([('major', 3), ('minor', 2), ('patch', 1), \
232-
('prerelease', None), ('build', None)])
231+
OrderedDict({'major': 3, 'minor': 4, 'patch': 5, 'prerelease': None, 'build': None})
233232
"""
234233
return collections.OrderedDict(
235234
(

0 commit comments

Comments
 (0)