diff --git a/pyWebLayout/io/readers/epub_reader.py b/pyWebLayout/io/readers/epub_reader.py index bc11e97..1856694 100644 --- a/pyWebLayout/io/readers/epub_reader.py +++ b/pyWebLayout/io/readers/epub_reader.py @@ -549,9 +549,10 @@ class EPUBReader: default_font = Font() error_para.add_word( Word( - f"Error loading chapter: { - str(e)}", - default_font)) + f"Error loading chapter: {str(e)}", + default_font + ) + ) chapter.add_block(error_para) # Still add PageBreak even after error chapter.add_block(PageBreak()) diff --git a/pyWebLayout/style/fonts.py b/pyWebLayout/style/fonts.py index 97e682f..90748da 100644 --- a/pyWebLayout/style/fonts.py +++ b/pyWebLayout/style/fonts.py @@ -110,8 +110,8 @@ class Font: logger.info(f"Loading bundled font from: {bundled_font_path}") self._font = ImageFont.truetype(bundled_font_path, self._font_size) logger.info( - f"Successfully loaded bundled font at size { - self._font_size}") + f"Successfully loaded bundled font at size {self._font_size}" + ) else: # Only fall back to PIL's default font if bundled font is not # available diff --git a/tests/io_tests/test_html_file_loader.py b/tests/io_tests/test_html_file_loader.py index 4515acd..de0e18e 100644 --- a/tests/io_tests/test_html_file_loader.py +++ b/tests/io_tests/test_html_file_loader.py @@ -78,8 +78,8 @@ class TestHTMLFileLoader(unittest.TestCase): self.assertGreater(len(blocks), 0, "Should extract blocks with custom font") print( - f"Successfully parsed HTML file with custom font, got { - len(blocks)} blocks") + f"Successfully parsed HTML file with custom font, got {len(blocks)} blocks" + ) def test_load_html_file_content_types(self): """Test that the loaded HTML file contains expected content types."""