Skip to content

Commit

Permalink
workaround mypy reporting 'error: Cannot determine type of "dispatche…
Browse files Browse the repository at this point in the history
…r" [has-type]'
  • Loading branch information
fphammerle committed Nov 14, 2022
1 parent e83e20c commit 83b0322
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion location_guessing_game_telegram_bot/__init__.py
Expand Up @@ -167,7 +167,10 @@ def _run(
use_context=True,
persistence=_Persistence(photos=photos),
)
updater.dispatcher.add_handler(telegram.ext.CommandHandler("photo", _photo_command))
# workaround for mypy reporting
# > error: Cannot determine type of "dispatcher" [has-type]
dispatcher: telegram.ext.dispatcher.Dispatcher = updater.dispatcher # type: ignore
dispatcher.add_handler(telegram.ext.CommandHandler("photo", _photo_command))
updater.start_polling()


Expand Down

0 comments on commit 83b0322

Please sign in to comment.