puppygirl-py/puppygirl/puppytype.py
2025-10-06 16:11:34 -04:00

12 lines
488 B
Python

from typing import BinaryIO, Iterable, TextIO, TypeAlias, TYPE_CHECKING
if TYPE_CHECKING:
from string import Template
from bs4 import BeautifulSoup, Tag
from puppygirl.elements import Node
Parsable: TypeAlias = "BeautifulSoup | Tag | str | bytes | TextIO | BinaryIO"
ElementLike: TypeAlias = "BeautifulSoup | Tag | str | Node"
ElementLikeList: TypeAlias = "Iterable[ElementLike]"
RenderableElement: TypeAlias = "Node | Iterable[Node]"
Templates: TypeAlias = "dict[str, Template]"