Fix failing mypy

This commit is contained in:
evgfilim1 2022-07-04 01:19:48 +05:00
parent 2da987daef
commit 6fb8dae945
No known key found for this signature in database
GPG key ID: D9F91B9DC64683A2
2 changed files with 17 additions and 16 deletions

View file

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

View file

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