mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
Add __str__ and __repr__ to MergedFilter.
This commit is contained in:
parent
3244417f61
commit
79e065a730
1 changed files with 7 additions and 0 deletions
|
@ -69,6 +69,13 @@ class MergedFilter(BaseFilter):
|
|||
elif self.or_filter:
|
||||
return self.base_filter(message) or self.or_filter(message)
|
||||
|
||||
def __str__(self):
|
||||
return ("<telegram.ext.filters.MergedFilter consisting of"
|
||||
" {} {} {}>").format(self.base_filter, "and" if self.and_filter else "or",
|
||||
self.and_filter or self.or_filter)
|
||||
|
||||
__repr__ = __str__
|
||||
|
||||
|
||||
class Filters(object):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue