Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 44708ef

Browse filesBrowse files
authored
Merge pull request #314 from tomschr/bugfix/312-usage-doc
Improve usage section
2 parents 073e314 + a8dd4ea commit 44708ef
Copy full SHA for 44708ef

File tree

5 files changed

+178
-143
lines changed
Filter options

5 files changed

+178
-143
lines changed

‎CHANGELOG.rst

Copy file name to clipboardExpand all lines: CHANGELOG.rst
+53Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,59 @@ in our repository.
1616

1717
.. towncrier release notes start
1818
19+
Version 3.0.0-dev.2
20+
===================
21+
22+
:Released: 2020-11-04
23+
:Maintainer:
24+
25+
26+
Improved Documentation
27+
----------------------
28+
29+
* :gh:`312`: Rework "Usage" section.
30+
31+
* Mention the rename of :class:`~semver.version.VersionInfo` to
32+
:class:`~semver.version.Version` class
33+
* Remove semver. prefix in doctests to make examples shorter
34+
* Correct some references to dunder methods like
35+
:func:`~.semver.version.Version.__getitem__`,
36+
:func:`~.semver.version.Version.__gt__` etc.
37+
* Remove inconsistencies and mention module level function as
38+
deprecated and discouraged from using
39+
* Make empty :py:func:`super` call in :file:`semverwithvprefix.py` example
40+
41+
42+
43+
----
44+
45+
46+
Version 3.0.0-dev.2
47+
===================
48+
49+
:Released: 2020-11-04
50+
:Maintainer:
51+
52+
53+
Improved Documentation
54+
----------------------
55+
56+
* :gh:`312`: Rework "Usage" section.
57+
58+
* Mention the rename of :class:`~semver.version.VersionInfo` to
59+
:class:`~semver.version.Version` class
60+
* Remove semver. prefix in doctests to make examples shorter
61+
* Correct some references to dunder methods like :func:`__getitem__`,
62+
:func:`__gt__` etc.
63+
* Remove inconsistencies and mention module level function as
64+
deprecated and discouraged from using
65+
* Make empty :py:func:`super` call in :file:`semverwithvprefix.py` example
66+
67+
68+
69+
----
70+
71+
1972
Version 3.0.0-dev.2
2073
===================
2174

‎changelog.d/213.improvement.rst

Copy file name to clipboardExpand all lines: changelog.d/213.improvement.rst
-1Lines changed: 0 additions & 1 deletion
This file was deleted.

‎changelog.d/312.doc.rst

Copy file name to clipboard
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Rework "Usage" section.
2+
3+
* Mention the rename of :class:`~semver.version.VersionInfo` to
4+
:class:`~semver.version.Version` class
5+
* Remove semver. prefix in doctests to make examples shorter
6+
* Correct some references to dunder methods like
7+
:func:`~.semver.version.Version.__getitem__`,
8+
:func:`~.semver.version.Version.__gt__` etc.
9+
* Remove inconsistencies and mention module level function as
10+
deprecated and discouraged from using
11+
* Make empty :py:func:`super` call in :file:`semverwithvprefix.py` example

‎docs/semverwithvprefix.py

Copy file name to clipboardExpand all lines: docs/semverwithvprefix.py
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,22 @@ class SemVerWithVPrefix(Version):
77
"""
88

99
@classmethod
10-
def parse(cls, version):
10+
def parse(cls, version: str) -> "SemVerWithVPrefix":
1111
"""
1212
Parse version string to a Version instance.
1313
1414
:param version: version string with "v" or "V" prefix
15-
:type version: str
1615
:raises ValueError: when version does not start with "v" or "V"
1716
:return: a new instance
18-
:rtype: :class:`SemVerWithVPrefix`
1917
"""
2018
if not version[0] in ("v", "V"):
2119
raise ValueError(
2220
"{v!r}: not a valid semantic version tag. Must start with 'v' or 'V'".format(
2321
v=version
2422
)
2523
)
26-
self = super(SemVerWithVPrefix, cls).parse(version[1:])
27-
return self
24+
return super().parse(version[1:])
2825

29-
def __str__(self):
26+
def __str__(self) -> str:
3027
# Reconstruct the tag
31-
return "v" + super(SemVerWithVPrefix, self).__str__()
28+
return "v" + super().__str__()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.