File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import gzip
1414import re
1515from os import path
16- from typing import Any , Dict
16+ from typing import TYPE_CHECKING , Any , Dict
1717
1818from docutils import nodes
1919from sphinx import addnodes
3131 import lxml .etree as etree # type: ignore
3232
3333
34- if False :
34+ if TYPE_CHECKING :
3535 # For type annotation
36+ from pathlib import Path
3637 from typing import List # NOQA
3738
3839__version__ = '1.0.3'
@@ -74,7 +75,7 @@ def handle_finish(self):
7475 self .build_devhelp (self .outdir , self .config .devhelp_basename )
7576
7677 def build_devhelp (self , outdir , outname ):
77- # type: (str , str) -> None
78+ # type: (Path , str) -> None
7879 logger .info (__ ('dumping devhelp index...' ))
7980
8081 # Basic info
Original file line number Diff line number Diff line change @@ -33,4 +33,4 @@ extras =
3333 test
3434 lint
3535commands =
36- mypy sphinxcontrib/
36+ mypy sphinxcontrib/ --explicit-package-bases
You can’t perform that action at this time.
0 commit comments