Skip to content

Instantly share code, notes, and snippets.

from typing import Any, ClassVar, Generator, Generic, List, Optional, TypeVar, overload
from unittest.mock import sentinel
EntityType = TypeVar("EntityType", bound="ChainObject[Any]")
UNSET_ENTITY = sentinel.UNSET_ENTITY
class ChainObject(Generic[EntityType]):
from __future__ import annotations
from asyncio import to_thread
from random import sample
from string import ascii_uppercase, digits
from typing import TYPE_CHECKING, NamedTuple
from aiogram.types import BufferedInputFile
from captcha.image import ImageCaptcha
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING
from aiogram import BaseMiddleware
from cachetools import TTLCache
if TYPE_CHECKING: