Skip to content

Commit 1f0d49b

Browse files
tomschrtlaferriere
andauthored
Fix #252: Correct wrong str type in docstring (#253)
* Type should be VersionInfo instead of str in VersionInfo.bump_build and VersionInfo.bump_prerelease * Make rtype line in docstrings consistent * Use :class: prefix for VersionInfo object Co-authored-by: Thomas Laferriere <tlaferriere@users.noreply.github.com>
1 parent f55559a commit 1f0d49b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

semver.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def bump_major(self):
328328
untouched.
329329
330330
:return: new object with the raised major part
331-
:rtype: VersionInfo
331+
:rtype: :class:`VersionInfo`
332332
333333
>>> ver = semver.VersionInfo.parse("3.4.5")
334334
>>> ver.bump_major()
@@ -343,7 +343,7 @@ def bump_minor(self):
343343
untouched.
344344
345345
:return: new object with the raised minor part
346-
:rtype: VersionInfo
346+
:rtype: :class:`VersionInfo`
347347
348348
>>> ver = semver.VersionInfo.parse("3.4.5")
349349
>>> ver.bump_minor()
@@ -358,7 +358,7 @@ def bump_patch(self):
358358
untouched.
359359
360360
:return: new object with the raised patch part
361-
:rtype: VersionInfo
361+
:rtype: :class:`VersionInfo`
362362
363363
>>> ver = semver.VersionInfo.parse("3.4.5")
364364
>>> ver.bump_patch()
@@ -374,7 +374,7 @@ def bump_prerelease(self, token="rc"):
374374
375375
:param token: defaults to 'rc'
376376
:return: new object with the raised prerelease part
377-
:rtype: str
377+
:rtype: :class:`VersionInfo`
378378
379379
>>> ver = semver.VersionInfo.parse("3.4.5-rc.1")
380380
>>> ver.bump_prerelease()
@@ -392,7 +392,7 @@ def bump_build(self, token="build"):
392392
393393
:param token: defaults to 'build'
394394
:return: new object with the raised build part
395-
:rtype: str
395+
:rtype: :class:`VersionInfo`
396396
397397
>>> ver = semver.VersionInfo.parse("3.4.5-rc.1+build.9")
398398
>>> ver.bump_build()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy