File tree Expand file tree Collapse file tree 4 files changed +29
-13
lines changed
Expand file tree Collapse file tree 4 files changed +29
-13
lines changed Original file line number Diff line number Diff line change 22
33from importlib .metadata import version
44
5+ __all__ = ["__version__" ]
6+
57__version__ = version ("pdfbaker" )
Original file line number Diff line number Diff line change 99from . import errors
1010from .document import PDFBakerDocument
1111
12+ __all__ = ["PDFBaker" ]
13+
1214
1315class PDFBaker :
1416 """Main class for PDF document generation."""
Original file line number Diff line number Diff line change 22
33from pathlib import Path
44
5+ __all__ = [
6+ "PDFBakeError" ,
7+ "PDFCombineError" ,
8+ "PDFCompressionError" ,
9+ "SVGConversionError" ,
10+ ]
11+
512
613class PDFBakeError (Exception ):
714 """Base exception for PDF baking errors."""
815
916
17+ class PDFCombineError (PDFBakeError ):
18+ """Failed to combine PDFs."""
19+
20+
21+ class PDFCompressionError (PDFBakeError ):
22+ """Failed to compress PDF."""
23+
24+
1025class SVGConversionError (PDFBakeError ):
1126 """Failed to convert SVG to PDF."""
1227
@@ -17,11 +32,3 @@ def __init__(
1732 self .backend = backend
1833 self .cause = cause
1934 super ().__init__ (f"Failed to convert { svg_path } using { backend } : { cause } " )
20-
21-
22- class PDFCombineError (PDFBakeError ):
23- """Failed to combine PDFs."""
24-
25-
26- class PDFCompressionError (PDFBakeError ):
27- """Failed to compress PDF."""
Original file line number Diff line number Diff line change 22
33from typing import NotRequired , TypedDict
44
5-
6- class StyleDict (TypedDict ):
7- """Style configuration."""
8-
9- highlight_color : NotRequired [str ]
5+ __all__ = [
6+ "ImageSpec" ,
7+ "StyleDict" ,
8+ ]
109
1110
1211class ImageSpec (TypedDict ):
@@ -15,3 +14,9 @@ class ImageSpec(TypedDict):
1514 name : str
1615 type : NotRequired [str ]
1716 data : NotRequired [str ]
17+
18+
19+ class StyleDict (TypedDict ):
20+ """Style configuration."""
21+
22+ highlight_color : NotRequired [str ]
You can’t perform that action at this time.
0 commit comments