-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Update _message.py - issue #2606 #2741
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
Conversation
…t#2612) Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Signed-off-by: starry69 <starry369126@outlook.com> Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
…m-bot#2634) Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Sure, will do. Due to my exams I wasn't online here for 2 days. Will do so and give an update. Thx! |
Hi, so I fetched the latest from branch v14 yesterday. Later yesterday I noticed 1 check being canceled, which I am not aware of. And mainly I haven't changed/modified anything for it to fail. I just fetched upstream all the changes that were implemented in the past week. Have been trying to learn where the check has been canceled. Surfed the same issue on the internet and people tend to say it's sometimes failing for some reason and not due to our PR. Anyway, I just thought of asking you guys. thanks in advance :) Note: Attaching the screenshot of what is displayed for me in this page |
Don't worry about the checks until you implemented all the changes and then the feedback of the maintainers :D |
Okay, thanks! |
Hi, having a qq, while I was resolving a similar |
test_message: test for updated change reg issue python-telegram-bot#2606 reply_keyboard_markup : ensure self.keyboard is not null before assigning to attributes
Hi so I have added tests for the already implemented changes (test_message.py). Apart from that, the above mentioned addition of a null check on keyboardmarkup too I have committed to review the checks. Thx! And also I am in the process of reviewing other similar changes. Will update here as and when I complete them. |
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.
Hi. Sorry for the late reply. I addressed your question on ReplyKeyboardMarkup
below.
I'll do a more thorough review once you indicate that you've made all required changes :)
@@ -468,7 +468,7 @@ def __init__( | |||
self.audio = audio | |||
self.game = game | |||
self.document = document | |||
self.photo = photo or [] | |||
self.photo = photo or None |
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.
the or None
is redundant :)
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.
Right yes, shall modify it :)
# ensure keyboard is notnull before assigning | ||
if self.keyboard: | ||
self._id_attrs = (self.keyboard,) |
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.
I don't think this check is necessary. keyboard
is a mandatory argument and if the user passes something that's not a list of lists of buttons, that's their fault.
Additionally, the sanity check in line 95 alread checks the "list of lists" part. So if we get here, self.keyboard
is [[]]
in the worst case, which will pass the if self.keyboard
check.
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.
Right. Yeah the check at 95 was there, but I thought for ensuring the null check would be necessary.
But thanks to your comment, I just reviewed and realized it doesn't get to null anywhere. Sure will do changes and let you know
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.
And regarding conflicts there is a huge number of conflicts showing up now but wasn't there when I pushed yesterday.. Is it for me alone?
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.
just pull from v14 into this branch, it should be fine :)
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.
Yes, I have tried to do it. I was prompted to create a PR and I did so, but now I am stuck here. Could you pls give me a solution so that I have the latest V14? Thanks in advance!
P.S: Due to my access issue I was unable to login to Github and hence the delay.
Here's the screen of the PR that I created when prompted.
Also in the current PR thread, I am notified that there are conflicts that cannot be automatically resolved..
5c26c91
to
74c4270
Compare
Hi. We discussed this issue in the dev chat again and had a bit of a change of heart. While the main argument to change to
and should be changed to something like
@nivramam I'm sorry that we reverted our decision only after you started to work on this PR. I hope that you haven't put too much time into it and that you can understand our decision. If your are interested, you're very welcome to instead PR for the mentioned updates of the documentation. In this case, please fetch the current |
Oh fine. Yes no issues on my side since I didn't have access to GitHub in the last month so no more updates from my side. Sure will try to PR the mentioned updates. Thanks! |
closes #2606
Checklist for PR
message.photo = None
instead of an empty list[]
.. versionadded:: version
,.. versionchanged:: version
or.. deprecated:: version
to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)AUTHORS.rst
(optional)