Update mypy to 0.950 and fix complaints (#12650)

This commit is contained in:
David Robertson 2022-05-06 13:35:20 +01:00 committed by GitHub
parent c2d50e9f6c
commit 2607b3e181
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 98 additions and 57 deletions

View file

@ -147,7 +147,9 @@ class PresenceRouter:
# run all the callbacks for get_users_for_states and combine the results
for callback in self._get_users_for_states_callbacks:
try:
result = await callback(state_updates)
# Note: result is an object here, because we don't trust modules to
# return the types they're supposed to.
result: object = await callback(state_updates)
except Exception as e:
logger.warning("Failed to run module API callback %s: %s", callback, e)
continue