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
1 change: 1 addition & 0 deletions changelog.d/410.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Export functions properly using `__all__` in `__init__.py`.
35 changes: 34 additions & 1 deletion src/semver/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
semver package major release 3.
Semver package major release 3.

A Python module for semantic versioning. Simplifies comparing versions.
"""
Expand Down Expand Up @@ -37,3 +37,36 @@
__maintainer_email__,
SEMVER_SPEC_VERSION,
)

__all__ = [
"bump_build",
"bump_major",
"bump_minor",
"bump_patch",
"compare",
"bump_prerelease",
"finalize_version",
"format_version",
"match",
"max_ver",
"min_ver",
"parse",
"parse_version_info",
"replace",
"cmd_bump",
"cmd_compare",
"cmd_nextver",
"cmd_check",
"createparser",
"process",
"main",
"Version",
"VersionInfo",
"__version__",
"__author__",
"__maintainer__",
"__author_email__",
"__description__",
"__maintainer_email__",
"SEMVER_SPEC_VERSION",
]
2 changes: 1 addition & 1 deletion src/semver/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def cmd_check(args: argparse.Namespace) -> None:

def cmd_compare(args: argparse.Namespace) -> str:
"""
Subcommand: Compare two versions
Subcommand: Compare two versions.

Synopsis: compare <VERSION1> <VERSION2>

Expand Down
4 changes: 2 additions & 2 deletions src/semver/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class Version:
See specification at https://semver.org.

:param major: version when you make incompatible API changes.
:param minor: version when you add functionality in
a backwards-compatible manner.
:param minor: version when you add functionality in a backwards-
compatible manner.
:param patch: version when you make backwards-compatible bug fixes.
:param prerelease: an optional prerelease string
:param build: an optional build string
Expand Down