-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add VersionWithSource type to py-rattler #304
Add VersionWithSource type to py-rattler #304
Conversation
I think if we add a E.g. class VersionBase:
@property
def epoch(self) -> Optional[str]:
"""
Gets the epoch of the version or `None` if the epoch was not defined.
Examples
--------
>>> v = Version('2!1.0')
>>> v.epoch
2
"""
return self._version.epoch()
@property
def has_local(self) -> bool:
"""
Returns true if this version has a local segment defined.
The local part of a version is the part behind the (optional) `+`.
Examples
--------
>>> v = Version('1.0+3.2-alpha0')
>>> v.has_local
True
>>> v2 = Version('1.0')
>>> v2.has_local
False
"""
return self._version.has_local() If both, |
Instead of having a VersionBase, wouldnt it be possible to have a Version and a VersionWithSource that derives from Version and adds a source string? Thats essentially what it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach but it raises the question: do we even need the PyVersionWithSource
?
No description provided.