Skip to content

Commit

Permalink
docs(conf): pydocstyle manual fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Dec 10, 2023
1 parent 45ef4d2 commit fe12b2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# flake8: NOQA: E501
"""Sphinx documentation configuration for unihan-db."""
import inspect
import pathlib
import sys
Expand Down Expand Up @@ -207,11 +208,12 @@ def linkcode_resolve(domain: str, info: t.Dict[str, str]) -> t.Union[None, str]:


def remove_tabs_js(app: "Sphinx", exc: Exception) -> None:
# Fix for sphinx-inline-tabs#18
"""Fix for sphinx-inline-tabs#18."""
if app.builder.format == "html" and not exc:
tabs_js = pathlib.Path(app.builder.outdir) / "_static" / "tabs.js"
tabs_js.unlink(missing_ok=True)


def setup(app: "Sphinx") -> None:
"""Sphinx setup hook."""
app.connect("build-finished", remove_tabs_js)

0 comments on commit fe12b2b

Please sign in to comment.