diff --git a/examples/timerbot.py b/examples/timerbot.py index 151f45156..c40205982 100644 --- a/examples/timerbot.py +++ b/examples/timerbot.py @@ -79,7 +79,7 @@ def error(bot, update, error): def main(): global job_queue - updater = Updater("148447715:AAH4M0gzPG11_mdQS1Qeb0Ex30I5-rw9bMY") + updater = Updater("TOKEN") job_queue = updater.job_queue # Get the dispatcher to register handlers diff --git a/telegram/ext/__init__.py b/telegram/ext/__init__.py index 10b0194a5..8d89fd4c8 100644 --- a/telegram/ext/__init__.py +++ b/telegram/ext/__init__.py @@ -33,6 +33,6 @@ from .stringregexhandler import StringRegexHandler from .typehandler import TypeHandler __all__ = ('Dispatcher', 'JobQueue', 'Job', 'Updater', 'CallbackQueryHandler', - 'ChosenInlineResultHandler', 'CommandHandler', 'Handler', - 'InlineQueryHandler', 'MessageHandler', 'Filters', 'RegexHandler', - 'StringCommandHandler', 'StringRegexHandler', 'TypeHandler') + 'ChosenInlineResultHandler', 'CommandHandler', 'Handler', 'InlineQueryHandler', + 'MessageHandler', 'Filters', 'RegexHandler', 'StringCommandHandler', + 'StringRegexHandler', 'TypeHandler') diff --git a/telegram/ext/jobqueue.py b/telegram/ext/jobqueue.py index 8a1dad253..7ee85664f 100644 --- a/telegram/ext/jobqueue.py +++ b/telegram/ext/jobqueue.py @@ -103,8 +103,8 @@ class JobQueue(object): job.run() except: - self.logger.exception('An uncaught error was raised while executing job %s' - % job.name) + self.logger.exception( + 'An uncaught error was raised while executing job %s' % job.name) else: self.logger.debug('Skipping disabled job %s' % job.name) diff --git a/telegram/ext/updater.py b/telegram/ext/updater.py index d9d687ac5..ae491bdb5 100644 --- a/telegram/ext/updater.py +++ b/telegram/ext/updater.py @@ -65,11 +65,7 @@ class Updater(object): ValueError: If both `token` and `bot` are passed or none of them. """ - def __init__(self, - token=None, - base_url=None, - workers=4, - bot=None): + def __init__(self, token=None, base_url=None, workers=4, bot=None): if (token is None) and (bot is None): raise ValueError('`token` or `bot` must be passed') if (token is not None) and (bot is not None):