Skip to content
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

VersionInfo constructor should use keyword arguments for prerelease and build with default set as None #98

Closed
scls19fr opened this issue May 31, 2018 · 0 comments

Comments

@scls19fr
Copy link
Member

https://github.com/k-bx/python-semver/blob/d964b1668cb9ae0d941b9fdbec9f3b42121805c3/semver.py#L86

should be

 def __init__(self, major, minor, patch, prerelease=None, build=None): 

Code showing problem:

In [1]: from semver import VersionInfo

In [2]: VersionInfo(1, 2, 3)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-f524b302b2ba> in <module>()
----> 1 VersionInfo(1,2,3)

TypeError: __init__() missing 2 required positional arguments: 'prerelease' and 'build'

In [3]: VersionInfo(1, 2, 3, None, None)
Out[3]: VersionInfo(major=1, minor=2, patch=3, prerelease=None, build=None)
@scls19fr scls19fr changed the title VersionInfo constructor should use default keyword arguments for prerelease and build VersionInfo constructor should use keyword arguments for prerelease and build with default set as None May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant