1
0
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:
Yohann D'ANELLO
2020-11-03 18:16:36 +01:00
parent c35fb4e996
commit fa368a399a
6 changed files with 19 additions and 18 deletions

View File

@ -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