Coverage for src/pdfbaker/types.py: 100%
13 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-20 04:55 +1200
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-20 04:55 +1200
1"""Type definitions for pdfbaker."""
3from typing import NotRequired, TypedDict
5__all__ = [
6 "ImageSpec",
7 "PathSpec",
8 "StyleDict",
9]
12class _ImageDict(TypedDict):
13 """Image specification."""
15 name: str
16 type: NotRequired[str]
17 data: NotRequired[str]
20ImageSpec = str | _ImageDict
23class StyleDict(TypedDict):
24 """Style configuration."""
26 highlight_color: NotRequired[str]
29class _PathSpecDict(TypedDict):
30 """File/Directory location in YAML config."""
32 path: NotRequired[str]
33 name: NotRequired[str]
36PathSpec = str | _PathSpecDict