From 49aee14fcaeb2fa17f6e58c7ae9ee3d993bdb8c7 Mon Sep 17 00:00:00 2001 From: Waffle Date: Sat, 19 May 2018 00:42:06 +0300 Subject: [PATCH] Make _test_filter method static and a bit clear doc strings --- telebot/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 8f9b60b..511cb73 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -984,7 +984,6 @@ class TeleBot: def get_sticker_set(self, name): """ Use this method to get a sticker set. On success, a StickerSet object is returned. - :param token: :param name: :return: """ @@ -1135,7 +1134,7 @@ class TeleBot: """ Clears all callback functions registered by register_for_reply() and register_for_reply_by_message_id(). - :param message_id: The message for which we want to clear reply handlers + :param message: The message for which we want to clear reply handlers """ message_id = message.message_id self.clear_reply_handlers_by_message_id(message_id) @@ -1328,7 +1327,8 @@ class TeleBot: return True - def _test_filter(self, filter, filter_value, message): + @staticmethod + def _test_filter(filter, filter_value, message): test_cases = { 'content_types': lambda msg: msg.content_type in filter_value, 'regexp': lambda msg: msg.content_type == 'text' and re.search(filter_value, msg.text, re.IGNORECASE),