-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat(python): add poetry support #188
feat(python): add poetry support #188
Conversation
@TimothyJones, can you take a look at this when you have time? |
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.
Thanks for the reminder! LGTM, and I've put a couple suggestions inline.
I'll run the build, but it will fail without the autoformatter being run on this.
I'm heading out the door, but if the formatter hasn't been run by the next time I look at this, I'll push a commit that does it.
lib/updaters/types/python.js
Outdated
@@ -0,0 +1,29 @@ | |||
const semverRegex = /version[" ]*=[ ]*["'](.*)["']/i |
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.
This variable is a bit misleadingly named - it might be better as versionExtractRegex
or similar, since it's not really testing for semver.
lib/updaters/types/python.js
Outdated
if (found == null) { | ||
return false | ||
} | ||
version = found[1] |
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.
Optional: I had to read this a couple times to see why version
wasn't always undefined. I reckon it'd be clearer if it got the index, and then extracted the version in separate steps. This is because people making changes to open source are often in a hurry, so it's worth optimising for ability to skim-read accurately.
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.
@TimothyJones , thanks for the feedback. I updated the variable name from found
to versionMatcher
and added a comment as to returning false when no version is found. Please let me know if you want this adjusted further.
Oh, and could you add a note to the readme that explains how to use it, and any caveats for Python people? |
39defd6
to
2a85784
Compare
@TimothyJones , reminder to follow up on this. |
Oh, sorry - I don't get notified unless there's new comments. I'll take a look now |
Needs |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #188 +/- ##
==========================================
- Coverage 94.11% 92.80% -1.32%
==========================================
Files 26 29 +3
Lines 493 542 +49
==========================================
+ Hits 464 503 +39
- Misses 29 39 +10 ☔ View full report in Codecov by Sentry. |
Releasing now. I'll also figure out why I didn't get notified about your reply in the comment thread. Sorry about that! Thanks again for the PR! |
Released as 12.5.0 |
Resubmitted/adjusted from conventional-changelog#643