-
Notifications
You must be signed in to change notification settings - Fork 251
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
semver: improve constraint parsing #327
Conversation
Shouldn't the regex be fixed? This seems like doing workarounds. |
Probably yes. But that requires a bit more testing I reckon as I am unsure what the impact of that is going to be else where and in poetry. Will take a look. |
c0e7a91
to
376dc7f
Compare
376dc7f
to
ffb2dd1
Compare
ffb2dd1
to
c920fc8
Compare
@radoering ended up doing a more comprehensive fix. Thanks for the nudge :) |
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.
Much better than before. 👍 Just some minor nitpicks.
Let me know if you feel strongly about any of the comments I responded to. |
At the moment, we allow trailing white space for 2 out of 5 constraint patterns. If we allow it, shouldn't we do for all? I only feel strongly against "Not common enough to be tested.". A test seems quite easy and makes clear that this part of the regex is not a mistake. |
I agree. Will allow it in all of them as it makes sense. Tests too ;) |
7497cfc
to
2fa9e3f
Compare
This change replaces the custom regex used with `packaging.version.VERSION_PATTERN` for consistency with other parts of the code base. Additionally, this fixes previous issues with parsing pre-release dev releases etc.
2fa9e3f
to
af7f815
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This change replaces the custom regex used with `packaging.version.VERSION_PATTERN` for consistency with other parts of the code base. Additionally, this fixes previous issues with parsing pre-release dev releases etc.
This change replaces the custom regex used with `packaging.version.VERSION_PATTERN` for consistency with other parts of the code base. Additionally, this fixes previous issues with parsing pre-release dev releases etc.
This change replaces the custom regex used with
packaging.version.VERSION_PATTERN
for consistency with other parts of the code base. Additionally, this fixes previous issues with parsing dev releases etc.