Additional type hints for REST servlets (part 2). (#10674)

Applies the changes from #10665 to additional modules.
This commit is contained in:
Patrick Cloke 2021-08-26 07:53:52 -04:00 committed by GitHub
parent 5548fe0978
commit 1aa0dad021
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 216 additions and 138 deletions

View file

@ -353,6 +353,11 @@ class BasePresenceHandler(abc.ABC):
# otherwise would not do).
await self.set_state(UserID.from_string(user_id), state, force_notify=True)
async def is_visible(self, observed_user: UserID, observer_user: UserID) -> bool:
raise NotImplementedError(
"Attempting to check presence on a non-presence worker."
)
class _NullContextManager(ContextManager[None]):
"""A context manager which does nothing."""