Skip to content

Commit 8acd4d9

Browse files
committed
doc: add type hints to Python sources
Signed-off-by: Benjamin Gilbert <[email protected]>
1 parent 7c885b2 commit 8acd4d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ repos:
5959
- id: mypy
6060
name: Check Python types
6161
additional_dependencies: [flask, openslide-bin, pillow, types-setuptools]
62-
exclude: "^doc/.*$"
6362

6463
- repo: https://github.com/rstcheck/rstcheck
6564
rev: v6.2.4

doc/jekyll_fix.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import os
2929

30+
from sphinx.application import Sphinx
3031
from sphinx.util import logging
3132
from sphinx.util.console import bold
3233

@@ -41,7 +42,7 @@
4142
REWRITE_EXTENSIONS = {'.html', '.js'}
4243

4344

44-
def remove_path_underscores(app, exception):
45+
def remove_path_underscores(app: Sphinx, exception: Exception | None) -> None:
4546
if exception:
4647
return
4748
# Get logger
@@ -82,5 +83,5 @@ def remove_path_underscores(app, exception):
8283
logger.info('done')
8384

8485

85-
def setup(app):
86+
def setup(app: Sphinx) -> None:
8687
app.connect('build-finished', remove_path_underscores)

0 commit comments

Comments
 (0)