Skip to content

Make docstrings consistent #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions semver.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,9 @@ def parse(version):
Parse version string to a VersionInfo instance.

:param version: version string
:return: a :class:`semver.VersionInfo` instance
:return: a :class:`VersionInfo` instance
:raises: :class:`ValueError`
:rtype: :class:`semver.VersionInfo`
:rtype: :class:`VersionInfo`

>>> semver.VersionInfo.parse('3.4.5-pre.2+build.4')
VersionInfo(major=3, minor=4, patch=5, \
Expand All @@ -667,14 +667,14 @@ def parse(version):
def replace(self, **parts):
"""
Replace one or more parts of a version and return a new
:class:`semver.VersionInfo` object, but leave self untouched
:class:`VersionInfo` object, but leave self untouched

.. versionadded:: 2.9.0
Added :func:`VersionInfo.replace`

:param dict parts: the parts to be updated. Valid keys are:
``major``, ``minor``, ``patch``, ``prerelease``, or ``build``
:return: the new :class:`semver.VersionInfo` object with the changed
:return: the new :class:`VersionInfo` object with the changed
parts
:raises: :class:`TypeError`, if ``parts`` contains invalid keys
"""
Expand Down Expand Up @@ -975,12 +975,12 @@ def finalize_version(version):
"""
Remove any prerelease and build metadata from the version string.

.. versionadded:: 2.7.9
Added :func:`finalize_version`

.. deprecated:: 2.10.0
Use :func:`semver.VersionInfo.finalize_version` instead.

.. versionadded:: 2.7.9
Added :func:`finalize_version`

:param version: version string
:return: the finalized version string
:rtype: str
Expand All @@ -997,12 +997,12 @@ def replace(version, **parts):
"""
Replace one or more parts of a version and return the new string.

.. versionadded:: 2.9.0
Added :func:`replace`

.. deprecated:: 2.10.0
Use :func:`semver.VersionInfo.replace` instead.

.. versionadded:: 2.9.0
Added :func:`replace`

:param str version: the version string to replace
:param dict parts: the parts to be updated. Valid keys are:
``major``, ``minor``, ``patch``, ``prerelease``, or ``build``
Expand Down