-
Notifications
You must be signed in to change notification settings - Fork 147
feat(account): add __str__ and __repr__ to AccountInfo #1129
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(account): add __str__ and __repr__ to AccountInfo #1129
Conversation
Signed-off-by: Akshat Kumar <[email protected]>
WalkthroughAdds str and repr methods to AccountInfo, updates an example to print AccountInfo directly, documents the change in CHANGELOG, and adds a unit test verifying both string representations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
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 |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #1129 +/- ##
==========================================
+ Coverage 91.04% 91.08% +0.03%
==========================================
Files 139 139
Lines 8409 8423 +14
==========================================
+ Hits 7656 7672 +16
+ Misses 753 751 -2 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Signed-off-by: Akshat8510 <[email protected]>
MonaaEid
left a comment
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.
Really good work!
|
Hi this si still in draft, is it ready to review once rebased? |
Signed-off-by: Akshat8510 <[email protected]>
|
Thank you so much @Akshat8510 and @MonaaEid ! |
…1129) Signed-off-by: Akshat Kumar <[email protected]> Signed-off-by: Akshat8510 <[email protected]> Signed-off-by: prajeeta pal <[email protected]>
Description:
This PR improves the developer experience by adding
__repr__and__str__methods to theAccountInfoclass. Previously, printing anAccountInfoobject resulted in a generic object representation (e.g.,<AccountInfo object at 0x...>). Now, it provides a human-readable summary (__str__) and a detailed debugging representation (__repr__).__repr__method toAccountInfofor detailed debugging output.__str__method toAccountInfofor a user-friendly summary of account details.tests/unit/account_info_test.pyto verify the new string representations.examples/account/account_info.pyto demonstrate the improved output.Related issue(s):
Fixes #1098
Notes for reviewer:
Here is the verified output from the updated example script
examples/account/account_info.py:Checklist
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.