Skip to content
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

Make MessageEntity objects comparable #1465

Merged
merged 3 commits into from Aug 23, 2019

Conversation

@Bibo-Joshi
Copy link
Member

Bibo-Joshi commented Aug 7, 2019

Right now comparison of MessageEntity object fails, e.g.

MessageEntity('bold', 2, 4) == MessageEntity('code', 5, 10)

yields True.

To make MessageEntity objects comparable, I used TelegramObjects attribute _id_attr. Also, I added a test_equality to test_messageentity.

Hinrich Mahler
@Bibo-Joshi Bibo-Joshi mentioned this pull request Aug 8, 2019
telegram/messageentity.py Outdated Show resolved Hide resolved
This reverts commit 383044a.
@tsnoam tsnoam merged commit c7e9281 into python-telegram-bot:master Aug 23, 2019
0 of 3 checks passed
0 of 3 checks passed
Codacy/PR Quality Review Hang in there, Codacy is reviewing your Pull request.
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@Bibo-Joshi Bibo-Joshi deleted the Bibo-Joshi:me-equal branch Aug 26, 2019
Bibo-Joshi added a commit to Bibo-Joshi/python-telegram-bot that referenced this pull request Aug 31, 2019
Bibo-Joshi added a commit to Bibo-Joshi/python-telegram-bot that referenced this pull request Sep 6, 2019
Bibo-Joshi added a commit to Bibo-Joshi/python-telegram-bot that referenced this pull request Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.