Add new MENTION filter [feature]#3857
Add new MENTION filter [feature]#3857ElmurodovJavohir wants to merge 8 commits intopython-telegram-bot:masterfrom
Conversation
|
Some test failed is it okay, or should I fix tests |
|
@Bibo-Joshi I have added unit test, and fixed docs build. But others test failing, that I not changed or effect, is it okay, or am I wrong any thing. |
harshil21
left a comment
There was a problem hiding this comment.
thanks for the pr.
test_official failing isn't your fault. However there is one line which isn't tested and that's why codecov is failing.
I'll review more later.
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Thanks for the PR! I left a number of comments
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Thanks for the updates! I left another batch of comments. I didn't have a look at the tests yet …
|
@Bibo-Joshi Thanks your feedbacks, I will fix it |
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Thanks for the updates. I left another batch of comments. Didn't look at the tests yet …
| if isinstance(mention, TGUser): | ||
| return bool(any(mention.id == e.user.id for e in message.entities if e.user)) |
There was a problem hiding this comment.
one should also check if mention.username is in one of the MessageEntities of type MessageEntity.MENTION
| if isinstance(mention, int): | ||
| return bool(any(mention == e.user.id for e in message.entities if e.user)) | ||
| return bool( | ||
| isinstance(mention, str) |
There was a problem hiding this comment.
Is there a specifi reason for this type check? Seems superfluous to me …
|
Due to inactivity, closing in favor of #3941 |
closes #3799