Compare commits
No commits in common. "8b833eef0b4eb83e185579e47db73d3dc2a9b858" and "10612fefaeff59c00c2c68b16172ebeff8a827a9" have entirely different histories.
8b833eef0b
...
10612fefae
@ -59,7 +59,8 @@ def draw_placeholder_content(page: Page):
|
||||
100),
|
||||
font=font)
|
||||
draw.text(
|
||||
(10, 10), f"Border: {page.border_size}px", fill=(
|
||||
(10, 10), f"Border: {
|
||||
page.border_size}px", fill=(
|
||||
150, 150, 150), font=font)
|
||||
draw.text(
|
||||
(content_x + 10,
|
||||
|
||||
@ -99,8 +99,8 @@ class Paragraph(Styleable, FontRegistry, Block):
|
||||
container.add_block(paragraph)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return paragraph
|
||||
|
||||
@ -251,8 +251,8 @@ class Heading(Paragraph):
|
||||
container.add_block(heading)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return heading
|
||||
|
||||
@ -313,8 +313,8 @@ class Quote(Block):
|
||||
container.add_block(quote)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return quote
|
||||
|
||||
@ -416,8 +416,8 @@ class CodeBlock(Block):
|
||||
container.add_block(code_block)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return code_block
|
||||
|
||||
@ -516,8 +516,8 @@ class HList(Block):
|
||||
container.add_block(hlist)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return hlist
|
||||
|
||||
@ -633,8 +633,8 @@ class ListItem(Block):
|
||||
container.add_item(item)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_item' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_item' method")
|
||||
|
||||
return item
|
||||
|
||||
@ -766,8 +766,8 @@ class TableCell(Block):
|
||||
container.add_cell(cell)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_cell' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_cell' method")
|
||||
|
||||
return cell
|
||||
|
||||
@ -909,8 +909,8 @@ class TableRow(Block):
|
||||
container.add_row(row, section)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_row' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_row' method")
|
||||
|
||||
return row
|
||||
|
||||
@ -1025,8 +1025,8 @@ class Table(Block):
|
||||
container.add_block(table)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return table
|
||||
|
||||
@ -1193,8 +1193,8 @@ class Image(Block):
|
||||
container.add_block(image)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return image
|
||||
|
||||
@ -1567,8 +1567,8 @@ class HorizontalRule(Block):
|
||||
container.add_block(hr)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return hr
|
||||
|
||||
@ -1608,7 +1608,7 @@ class PageBreak(Block):
|
||||
container.add_block(page_break)
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Container {type(container).__name__} must have an 'add_block' method"
|
||||
)
|
||||
f"Container {
|
||||
type(container).__name__} must have an 'add_block' method")
|
||||
|
||||
return page_break
|
||||
|
||||
@ -103,7 +103,8 @@ class RenderableImage(Renderable, Queriable):
|
||||
self._pil_image = PILImage.open(BytesIO(response.content))
|
||||
self._abstract_image._loaded_image = self._pil_image
|
||||
else:
|
||||
self._error_message = f"Failed to load image: HTTP status {response.status_code}"
|
||||
self._error_message = f"Failed to load image: HTTP status {
|
||||
response.status_code}"
|
||||
except ImportError:
|
||||
self._error_message = "Requests library not available for URL loading"
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user