refactor(bump): add type for out, replace function with re escape#1429
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## refactors #1429 +/- ##
============================================
Coverage ? 97.57%
============================================
Files ? 57
Lines ? 2680
Branches ? 0
============================================
Hits ? 2615
Misses ? 65
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| filepath = drive + path | ||
| if not regex: | ||
| regex = _version_to_regex(version) | ||
| regex = re.escape(version) |
There was a problem hiding this comment.
I'm not sure if I understand this correctly. version is not a regex string right? And regex is just for substring matching?
There was a problem hiding this comment.
I guess we want to support regex back then 🤔 , but it's not yet a regex.
It's used in
https://commitizen-tools.github.io/commitizen/commands/bump/#version_files
Lee-W
left a comment
There was a problem hiding this comment.
We probably could rename the regex variable or add regex support, but this PR alone looks good
| filepath = drive + path | ||
| if not regex: | ||
| regex = _version_to_regex(version) | ||
| regex = re.escape(version) |
There was a problem hiding this comment.
I guess we want to support regex back then 🤔 , but it's not yet a regex.
It's used in
https://commitizen-tools.github.io/commitizen/commands/bump/#version_files
Description
Checklist
Code Changes
poetry alllocally to ensure this change passes linter check and testsDocumentation Changes
poetry doclocally to ensure the documentation pages renders correctlyExpected Behavior
Steps to Test This Pull Request
Additional Context