Skip to content

Conversation

@harshil21
Copy link
Member

@harshil21 harshil21 commented Nov 6, 2020

Along with the bot API update, I also added a unpin() shortcut to message.py and unpin_all_chat_messages() shortcut to chat.py.
Also if the tests I wrote aren't good enough, please feel free to edit them.

The mypy build is failing because of something webhook handler related (probably due to API 5.0) (edit: Nvm it only failed for me locally, it's not failing here)

- Also added unpin() shortcut in message.py and unpin all msgs shortcut in chat.py

Signed-off-by: Harshil <ilovebhagwan@gmail.com>
Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Left some notes :)

@Bibo-Joshi Bibo-Joshi mentioned this pull request Nov 6, 2020
28 tasks
- Add pin_message() & unpin_message() shortcuts in `CallbackQuery`.
- Add pin_message(), unpin_message(), & unpin_all_messages() shortcuts in `User`.
- Rename unpin_all_chat_messages() to unpin_all_messages() in `Chat`
- Minor doc fixes.

Signed-off-by: Harshil <ilovebhagwan@gmail.com>
Signed-off-by: Harshil <ilovebhagwan@gmail.com>
@harshil21 harshil21 requested a review from Bibo-Joshi November 6, 2020 21:03
Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates. Left some more nitpicking. Don't mind the pytest failures for now, TG seems to need a break from us (hopefully that will get better once we use a selfhosted API instance 😎 ). Codecov is still failing, though:

image

The line marked in read is not hit by the tests

@harshil21
Copy link
Member Author

The line marked in read is not hit by the tests

Yea just realized that I was testing that as a positional argument 😳

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor nitpick left from my side. @Poolitzer will want to review as well, though.

@Bibo-Joshi Bibo-Joshi added this to the 13.1 milestone Nov 9, 2020
@Bibo-Joshi Bibo-Joshi added the ⚙️ bot-api affected functionality: bot-api label Nov 9, 2020
Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Poolitzer will want to review as well, though.

Dam Dam Daaaam. He wants though yeah. And he did some nitpicking about docs. And talks about himself in the third perspective.

Weird guy.

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that the docsring of Message.pinned_message changed as well, please update that :)

@harshil21
Copy link
Member Author

I just noticed that the docsring of Message.pinned_message changed as well, please update that :)

It didn't?
image

@Poolitzer
Copy link
Member

image
It did for me

@harshil21
Copy link
Member Author

image
It did for me

That's in Chat.pinned_message, which I did update. The one in Message.pinned_message didn't change though

@Poolitzer
Copy link
Member

oh thats right. Pretty sure that bibo mixed them up as well

@Bibo-Joshi
Copy link
Member

ups, my bad 😬 sorry for the confusion

@Bibo-Joshi
Copy link
Member

For some reason codecov marks docstring as uncovered, but afais all change requests were resolved. merging.
thanks for the contribution :)

@Bibo-Joshi Bibo-Joshi merged commit e84cf01 into python-telegram-bot:api-5.0-master Nov 13, 2020
@harshil21 harshil21 deleted the api-5.0-WP5 branch November 13, 2020 16:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚙️ bot-api affected functionality: bot-api

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants