mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-07-08 00:40:12 +02:00
More linting
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
import os
|
||||
from typing import Tuple
|
||||
from typing import Any, Dict, Optional, Tuple, Union
|
||||
|
||||
from asgiref.sync import async_to_sync
|
||||
from nio import *
|
||||
from nio import AsyncClient, DataProvider, ProfileSetAvatarError, ProfileSetAvatarResponse, \
|
||||
ProfileSetDisplayNameError, ProfileSetDisplayNameResponse, RoomCreateError, RoomCreateResponse, \
|
||||
RoomInviteError, RoomInviteResponse, RoomKickError, RoomKickResponse, RoomPreset, \
|
||||
RoomPutStateError, RoomPutStateResponse, RoomResolveAliasResponse, RoomVisibility, TransferMonitor, \
|
||||
UploadError, UploadResponse
|
||||
|
||||
|
||||
class Matrix:
|
||||
@ -263,7 +267,7 @@ class Matrix:
|
||||
|
||||
@classmethod
|
||||
@async_to_sync
|
||||
async def kick(cls, room_id: str, user_id: str, reason: str = None) -> Union[RoomKickResponse, RoomInviteError]:
|
||||
async def kick(cls, room_id: str, user_id: str, reason: str = None) -> Union[RoomKickResponse, RoomKickError]:
|
||||
"""
|
||||
Kick a user from a room, or withdraw their invitation.
|
||||
|
||||
@ -370,4 +374,3 @@ class FakeMatrixClient:
|
||||
async def func(*_, **_2):
|
||||
return None
|
||||
return func
|
||||
|
||||
|
Reference in New Issue
Block a user