-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
bug when calling get_dm_history with someone you have no entries with #190
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe change involves modifying the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Reviewer's Guide by SourceryThis pull request addresses a bug in the File-Level Changes
Tips
|
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.
Hey @shubh9 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- twikit/client/client.py (1 hunks)
Additional comments not posted (1)
twikit/client/client.py (1)
3041-3042
: Enhance error handling by checking for 'entries' key.The reassignment of the
items
variable is now contingent upon the presence of the 'entries' key in theresponse['conversation_timeline']
. This prevents potential KeyErrors and enhances error handling.The code changes are approved.
Summary by Sourcery
Fix the bug in get_dm_history by ensuring the function checks for the presence of 'entries' in the response before attempting to access them, preventing errors when there are no entries.
Bug Fixes:
Summary by CodeRabbit