fix: Type typing for class

This commit is contained in:
uburuntu 2021-07-30 01:43:20 +03:00
parent cd1bd973fd
commit 927128a898
No known key found for this signature in database
GPG key ID: 59E643252F903BE1

View file

@ -1,6 +1,5 @@
import datetime
import typing
from typing import Optional
from . import base, fields
from .user import User
@ -38,7 +37,7 @@ class ChatMemberStatus(helper.Helper):
return role in (cls.MEMBER, cls.ADMINISTRATOR, cls.CREATOR, cls.RESTRICTED)
@classmethod
def get_class_by_status(cls, status: str) -> Optional["ChatMember"]:
def get_class_by_status(cls, status: str) -> typing.Optional[typing.Type["ChatMember"]]:
return {
cls.OWNER: ChatMemberOwner,
cls.ADMINISTRATOR: ChatMemberAdministrator,