Do not coerce int properties if value already int#155
Conversation
If (the priority) property already is an integer, skip the int coercion and notably skip the warning about int coercion. Add a trival test checking that int priority properties goes through _coerce_properties unchanged.
|
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 (2)
📝 WalkthroughWalkthroughThe ChangesInteger property coercion fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
After upgrading from 2.0.1 to 3.0.1, I noticed that my logs contains lots of
WARNING:rabbitpy.message:Coercing property priority to intlines, which is slightly annoying.It seems to me that the cause is an unconditional coercion to int, even if the property value already is an integer--as it is in my case.
Here is a change that only does the int coercion if the value isn't an int already.
Hopefully this is okay.
Summary by CodeRabbit