mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 08:04:51 -04:00
Add missing type hints to synapse.api. (#11109)
* Convert UserPresenceState to attrs. * Remove args/kwargs from error classes and explicitly pass msg/errorcode.
This commit is contained in:
parent
cc33d9eee2
commit
3ab55d43bd
10 changed files with 84 additions and 99 deletions
|
@ -245,7 +245,7 @@ class Auth:
|
|||
|
||||
async def validate_appservice_can_control_user_id(
|
||||
self, app_service: ApplicationService, user_id: str
|
||||
):
|
||||
) -> None:
|
||||
"""Validates that the app service is allowed to control
|
||||
the given user.
|
||||
|
||||
|
@ -618,5 +618,13 @@ class Auth:
|
|||
% (user_id, room_id),
|
||||
)
|
||||
|
||||
async def check_auth_blocking(self, *args, **kwargs) -> None:
|
||||
await self._auth_blocking.check_auth_blocking(*args, **kwargs)
|
||||
async def check_auth_blocking(
|
||||
self,
|
||||
user_id: Optional[str] = None,
|
||||
threepid: Optional[dict] = None,
|
||||
user_type: Optional[str] = None,
|
||||
requester: Optional[Requester] = None,
|
||||
) -> None:
|
||||
await self._auth_blocking.check_auth_blocking(
|
||||
user_id=user_id, threepid=threepid, user_type=user_type, requester=requester
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue