Added StickerType enum

This commit is contained in:
Alex Root Junior 2022-11-23 20:35:29 +02:00
parent 00f89c57f6
commit 9d65238e43
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
6 changed files with 38 additions and 14 deletions

View file

@ -0,0 +1,9 @@
name: StickerType
description: |
The part of the face relative to which the mask should be placed.
Source: https://core.telegram.org/bots/api#maskposition
parse:
entity: Sticker
attribute: type
regexp: "'([a-z_]+)'"

View file

@ -33,17 +33,17 @@ repos:
args: [ '--config=.flake8' ]
files: *files
- repo: https://github.com/floatingpurr/sync_with_poetry
rev: 0.2.0
hooks:
- id: sync_with_poetry
# - repo: https://github.com/floatingpurr/sync_with_poetry
# rev: 0.2.0
# hooks:
# - id: sync_with_poetry
- repo: https://github.com/python-poetry/poetry
rev: '1.2.1'
hooks:
- id: poetry-check
- id: poetry-lock
args: [ "--no-update" ]
# - id: poetry-lock
# args: [ "--no-update" ]
- id: poetry-export
args: [ "-f", "requirements.txt", "--without-hashes", "-o", "requirements/base.txt" ]
- id: poetry-export

View file

@ -0,0 +1,13 @@
from enum import Enum
class StickerType(str, Enum):
"""
The part of the face relative to which the mask should be placed.
Source: https://core.telegram.org/bots/api#maskposition
"""
REGULAR = "regular"
MASK = "mask"
CUSTOM_EMOJI = "custom_emoji"

View file

@ -1,8 +0,0 @@
import enum
from typing import Any, List
class AutoName(str, enum.Enum):
@staticmethod
def _generate_next_value_(name: str, start: int, count: int, last_values: List[Any]) -> str:
return name.lower()

View file

@ -21,5 +21,6 @@ Here is list of all available enums:
message_entity_type
parse_mode
poll_type
sticker_type
topic_icon_color
update_type

View file

@ -0,0 +1,9 @@
###########
StickerType
###########
.. automodule:: aiogram.enums.sticker_type
:members:
:member-order: bysource
:undoc-members: True