mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: Type typing for class
This commit is contained in:
parent
cd1bd973fd
commit
927128a898
1 changed files with 1 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue