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

Use dedicated Revision type instead of primitive int #15

Open
ikhoon opened this issue Oct 29, 2021 · 0 comments
Open

Use dedicated Revision type instead of primitive int #15

ikhoon opened this issue Oct 29, 2021 · 0 comments
Labels

Comments

@ikhoon
Copy link
Contributor

ikhoon commented Oct 29, 2021

Currently, a revision is represented as an int.

revision: Optional[int] = None,

It would be nice to use a dedicated type introduced in #14
class Revision:
def __init__(self, major):
self.major = major
@staticmethod
def init() -> Revision:
return _INIT
@staticmethod
def head() -> Revision:
return _HEAD
_INIT = Revision(1)
_HEAD = Revision(-1)

@ikhoon ikhoon added the cleanup label Oct 29, 2021
@ikhoon ikhoon added this to the 0.1.0 milestone Oct 29, 2021
@hexoul hexoul modified the milestones: 0.1.0, 0.2.0 Jul 3, 2022
@ikhoon ikhoon modified the milestones: 0.2.0, 0.3.0 Aug 17, 2022
@hexoul hexoul removed this from the 0.3.0 milestone Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants