Skip to content

Commit 524bb3e

Browse files
committed
chore: Fix typings for remove_tabs_js
1 parent 7b92600 commit 524bb3e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/conf.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
from pathlib import Path
77

88
import tmuxp
9+
if t.TYPE_CHECKING:
10+
from sphinx.application import Sphinx
11+
912

1013
# Get the project root dir, which is the parent dir of this
1114
cwd = Path(__file__).parent
@@ -244,12 +247,12 @@ def linkcode_resolve(domain, info): # NOQA: C901
244247
linespec,
245248
)
246249

247-
248-
def remove_tabs_js(app, exc):
250+
def remove_tabs_js(app: "Sphinx", exc: Exception) -> None:
251+
# Fix for sphinx-inline-tabs#18
249252
if app.builder.format == "html" and not exc:
250253
tabs_js = Path(app.builder.outdir) / "_static" / "tabs.js"
251254
tabs_js.unlink()
252255

253256

254-
def setup(app):
257+
def setup(app: "Sphinx") -> None:
255258
app.connect("build-finished", remove_tabs_js)

0 commit comments

Comments
 (0)