Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions docs/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ Reference
>>> is_normalized_name("Django")
False

.. function:: canonicalize_version(version)
.. function:: canonicalize_version(version, strip_trailing_zero=True)

This function takes a string representing a package version (or a
:class:`~packaging.version.Version` instance), and returns the
normalized form of it.
normalized form of it. By default, it strips trailing zeros from
the release segment.

:param str version: The version to normalize.

Expand Down
2 changes: 1 addition & 1 deletion src/packaging/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class RawMetadata(TypedDict, total=False):


def _parse_keywords(data: str) -> list[str]:
"""Split a string of comma-separate keyboards into a list of keywords."""
"""Split a string of comma-separated keywords into a list of keywords."""
return [k.strip() for k in data.split(",")]


Expand Down