mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
yapf
This commit is contained in:
parent
8278779a23
commit
b3142d2974
4 changed files with 7 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue