diff options
Diffstat (limited to '')
-rw-r--r-- | sphinx/builders/epub3.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/builders/epub3.py b/sphinx/builders/epub3.py index 40d3ce7..91c76e4 100644 --- a/sphinx/builders/epub3.py +++ b/sphinx/builders/epub3.py @@ -22,6 +22,7 @@ from sphinx.util.osutil import make_filename if TYPE_CHECKING: from sphinx.application import Sphinx + from sphinx.util.typing import ExtensionMetadata logger = logging.getLogger(__name__) @@ -75,6 +76,7 @@ class Epub3Builder(_epub_base.EpubBuilder): and META-INF/container.xml. Afterwards, all necessary files are zipped to an epub file. """ + name = 'epub' epilog = __('The ePub file is in %(outdir)s.') @@ -240,7 +242,7 @@ def validate_config_values(app: Sphinx) -> None: def convert_epub_css_files(app: Sphinx, config: Config) -> None: - """This converts string styled epub_css_files to tuple styled one.""" + """Convert string styled epub_css_files to tuple styled one.""" epub_css_files: list[tuple[str, dict[str, Any]]] = [] for entry in config.epub_css_files: if isinstance(entry, str): @@ -256,11 +258,11 @@ def convert_epub_css_files(app: Sphinx, config: Config) -> None: config.epub_css_files = epub_css_files # type: ignore[attr-defined] -def setup(app: Sphinx) -> dict[str, Any]: +def setup(app: Sphinx) -> ExtensionMetadata: app.add_builder(Epub3Builder) # config values - app.add_config_value('epub_basename', lambda self: make_filename(self.project), False) + app.add_config_value('epub_basename', lambda self: make_filename(self.project), '') app.add_config_value('epub_version', 3.0, 'epub') # experimental app.add_config_value('epub_theme', 'epub', 'epub') app.add_config_value('epub_theme_options', {}, 'epub') |