Remove telegram_bot from mypy ignore list (#74661)

This commit is contained in:
epenet 2022-07-09 19:52:26 +02:00 committed by GitHub
parent 5defe67269
commit 0f33c08dca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View file

@ -22,10 +22,11 @@ async def async_setup_platform(hass, bot, config):
return True
def process_error(update: Update, context: CallbackContext):
def process_error(update: Update, context: CallbackContext) -> None:
"""Telegram bot error handler."""
try:
raise context.error
if context.error:
raise context.error
except (TimedOut, NetworkError, RetryAfter):
# Long polling timeout or connection problem. Nothing serious.
pass

View file

@ -2819,9 +2819,6 @@ ignore_errors = true
[mypy-homeassistant.components.sonos.statistics]
ignore_errors = true
[mypy-homeassistant.components.telegram_bot.polling]
ignore_errors = true
[mypy-homeassistant.components.template.number]
ignore_errors = true

View file

@ -74,7 +74,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.sonos.sensor",
"homeassistant.components.sonos.speaker",
"homeassistant.components.sonos.statistics",
"homeassistant.components.telegram_bot.polling",
"homeassistant.components.template.number",
"homeassistant.components.template.sensor",
"homeassistant.components.toon",