14 lines
609 B
Python
14 lines
609 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.puppygirl import TemplateInstance
|
|
from puppygirl.elements import Element
|
|
|
|
Parsable: TypeAlias = "BeautifulSoup | Tag | str | bytes | TextIO | BinaryIO"
|
|
ElementLike: TypeAlias = "BeautifulSoup | Tag | str | Element"
|
|
ElementLikeList: TypeAlias = "Iterable[ElementLike]"
|
|
RenderableElement: TypeAlias = "Element | Iterable[Element]"
|
|
Templatable: TypeAlias = "Template | TemplateInstance"
|
|
TemplateDict: TypeAlias = "dict[str, Template]"
|