Skip to content

Commit aba1193

Browse files
committed
Use os.PathLike over pathlib.Path
Sphinx 7.1 and earlier don't use ``pathlib`` internally.
1 parent 9dad69f commit aba1193

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sphinxcontrib/qthelp/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import re
99
from collections.abc import Iterable
1010
from os import path
11-
from pathlib import Path
1211
from typing import Any, cast
1312

1413
from docutils import nodes
@@ -89,7 +88,7 @@ def handle_finish(self) -> None:
8988
}
9089
self.build_qhp(self.outdir, self.config.qthelp_basename)
9190

92-
def build_qhp(self, outdir: Path, outname: str) -> None:
91+
def build_qhp(self, outdir: str | os.PathLike[str], outname: str) -> None:
9392
logger.info(__('writing project file...'))
9493

9594
# sections
@@ -239,7 +238,7 @@ def build_keywords(self, title: str, refs: list[Any], subitems: Any) -> list[str
239238

240239
return keywords
241240

242-
def get_project_files(self, outdir: Path) -> list[str]:
241+
def get_project_files(self, outdir: str | os.PathLike[str]) -> list[str]:
243242
project_files = []
244243
staticdir = path.join(outdir, '_static')
245244
imagesdir = path.join(outdir, self.imagedir)

0 commit comments

Comments
 (0)