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

Revision: ensure that 1 < 1.0.1; reformat test cases to use bare asserts #9290

Conversation

baroquebobcat
Copy link
Contributor

Problem

Currently Revision.lenient("1") > Revision.lenient("1.0.1")

See also #9289

Solution

Update __lt__ to fix error.

Result

Fixes above as Revision.lenient("1") < Revision.lenient("1.0.1")

Comment on lines +20 to +21
assert Revision.semver("1.2.3") == Revision.semver("1.2.3")
assert Revision.semver("1.2.3").components == [1, 2, 3, None, None]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this :)

@baroquebobcat
Copy link
Contributor Author

Fixing a lint error. The hooks that rely on v2 fail locally for me, so I've been having to use --no-verify and missing things from time to time. I really need to work around pex-tool/pex#898

@baroquebobcat baroquebobcat merged commit 747d637 into pantsbuild:master Mar 16, 2020
@stuhood stuhood deleted the nhoward/fix_revision_ordering_minor_issue branch March 16, 2020 20:34
@stuhood
Copy link
Member

stuhood commented Mar 16, 2020

Fixing a lint error. The hooks that rely on v2 fail locally for me, so I've been having to use --no-verify and missing things from time to time. I really need to work around pantsbuild/pex#898

See https://pantsbuild.slack.com/archives/C087V4P1T/p1584372416025200

wisechengyi pushed a commit that referenced this pull request May 5, 2020
…rts (#9290)

### Problem

Currently `Revision.lenient("1") > Revision.lenient("1.0.1")`

See also #9289

### Solution

Update `__lt__` to fix error.

### Result

Fixes above as `Revision.lenient("1") < Revision.lenient("1.0.1")`
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

Successfully merging this pull request may close these issues.

5 participants