mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix failing mypy
This commit is contained in:
parent
2da987daef
commit
6fb8dae945
2 changed files with 17 additions and 16 deletions
|
|
@ -20,16 +20,16 @@ class ChatAction(AutoName):
|
|||
Source: https://core.telegram.org/bots/api#sendchataction
|
||||
"""
|
||||
|
||||
TYPING: str = enum.auto()
|
||||
UPLOAD_PHOTO: str = enum.auto()
|
||||
RECORD_VIDEO: str = enum.auto()
|
||||
UPLOAD_VIDEO: str = enum.auto()
|
||||
RECORD_AUDIO: str = enum.auto()
|
||||
UPLOAD_AUDIO: str = enum.auto()
|
||||
RECORD_VOICE: str = enum.auto()
|
||||
UPLOAD_VOICE: str = enum.auto()
|
||||
UPLOAD_DOCUMENT: str = enum.auto()
|
||||
FIND_LOCATION: str = enum.auto()
|
||||
RECORD_VIDEO_NOTE: str = enum.auto()
|
||||
UPLOAD_VIDEO_NOTE: str = enum.auto()
|
||||
CHOOSE_STICKER: str = enum.auto()
|
||||
TYPING = enum.auto()
|
||||
UPLOAD_PHOTO = enum.auto()
|
||||
RECORD_VIDEO = enum.auto()
|
||||
UPLOAD_VIDEO = enum.auto()
|
||||
UPLOAD_AUDIO = enum.auto()
|
||||
RECORD_AUDIO = enum.auto()
|
||||
RECORD_VOICE = enum.auto()
|
||||
UPLOAD_VOICE = enum.auto()
|
||||
UPLOAD_DOCUMENT = enum.auto()
|
||||
FIND_LOCATION = enum.auto()
|
||||
RECORD_VIDEO_NOTE = enum.auto()
|
||||
UPLOAD_VIDEO_NOTE = enum.auto()
|
||||
CHOOSE_STICKER = enum.auto()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import enum
|
||||
from typing import Any, List
|
||||
|
||||
|
||||
class AutoName(str, enum.Enum):
|
||||
|
||||
def _generate_next_value_(self, start, count, last_values) -> str:
|
||||
return self.lower()
|
||||
@staticmethod
|
||||
def _generate_next_value_(name: str, start: int, count: int, last_values: List[Any]) -> str:
|
||||
return name.lower()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue