Skip to content

Commit 0bcd3f2

Browse files
committed
Allow ImageSpec to be just a string
1 parent 82c35ae commit 0bcd3f2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/pdfbaker/types.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
]
99

1010

11-
class ImageSpec(TypedDict):
11+
class ImageDict(TypedDict):
1212
"""Image specification."""
1313

1414
name: str
1515
type: NotRequired[str]
1616
data: NotRequired[str]
1717

1818

19+
ImageSpec = str | ImageDict
20+
21+
1922
class StyleDict(TypedDict):
2023
"""Style configuration."""
2124

0 commit comments

Comments
 (0)