Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Oct 18, 2024
1 parent ac40d1b commit 919dafe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sphinxnotes/fasthtml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
TODO:
- [ ] config-able.
- [ ] copy files? such as download-able files.
"""

Expand All @@ -27,7 +28,6 @@

if TYPE_CHECKING:
from sphinx.application import Sphinx
from sphinx.builders import Builder

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -109,7 +109,7 @@ def _restore_config(self) -> None:


def _dummy_check_consistency() -> None:
"""Used to overwrte :meth:`BuildEnvironment.check_consistency`, for
"""Used to overwrte :meth:`BuildEnvironment.check_consistency`, for
skipping the consistency checking of Sphinx.
"""
raise SkipProgressMessage
Expand All @@ -119,7 +119,9 @@ def _on_builder_inited(app: Sphinx):
if not isinstance(app.builder, FastHTMLBuilder):
# Restore env.check_consistency.
if app.env.check_consistency == _dummy_check_consistency:
app.env.check_consistency = functools.partial(BuildEnvironment.check_consistency, app.env)
app.env.check_consistency = functools.partial(
BuildEnvironment.check_consistency, app.env
)
return

app.builder._overwrite_config()
Expand Down

0 comments on commit 919dafe

Please sign in to comment.