Centralize version parsing and normalization#575
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughFirmware version parsing logic—previously duplicated across client checking, command detection, and property formatting—is consolidated into two shared utility functions in a new ChangesVersion Parsing Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
This PR centralizes the duplicate version parsing and normalization logic into a single helper module.
Changes
openevsehttp/utils.py:normalize_versionandget_awesome_version.openevsehttp/properties.py:wifi_firmwareto usenormalize_version.openevsehttp/client.py:_version_checkto useget_awesome_version.openevsehttp/commands.py:firmware_checkto useget_awesome_version.This reduces code duplication and ensures consistent parsing across the library.
Summary by CodeRabbit