Skip to content

Commit cd64a05

Browse files
committed
Tidy up __all__
1 parent f1b4fd4 commit cd64a05

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

src/pdfbaker/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
from importlib.metadata import version
44

5+
__all__ = ["__version__"]
6+
57
__version__ = version("pdfbaker")

src/pdfbaker/baker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from . import errors
1010
from .document import PDFBakerDocument
1111

12+
__all__ = ["PDFBaker"]
13+
1214

1315
class PDFBaker:
1416
"""Main class for PDF document generation."""

src/pdfbaker/errors.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,26 @@
22

33
from pathlib import Path
44

5+
__all__ = [
6+
"PDFBakeError",
7+
"PDFCombineError",
8+
"PDFCompressionError",
9+
"SVGConversionError",
10+
]
11+
512

613
class 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+
1025
class 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."""

src/pdfbaker/types.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
from 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

1211
class 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]

0 commit comments

Comments
 (0)