Skip to content

Commit 7ecbc2c

Browse files
committed
Use os.PathLike over pathlib.Path
Sphinx 7.1 and earlier don't use ``pathlib`` internally.
1 parent 6419ea4 commit 7ecbc2c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: sphinxcontrib/devhelp/__init__.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
from __future__ import annotations
77

88
import gzip
9+
import os
910
import re
1011
from os import path
11-
from typing import TYPE_CHECKING, Any
12+
from typing import Any
1213

1314
from docutils import nodes
1415
from sphinx import addnodes
@@ -25,9 +26,6 @@
2526
except ImportError:
2627
import lxml.etree as etree # type: ignore
2728

28-
if TYPE_CHECKING:
29-
from pathlib import Path
30-
3129
__version__ = '1.0.4'
3230
__version_info__ = (1, 0, 4)
3331

@@ -64,7 +62,7 @@ def init(self) -> None:
6462
def handle_finish(self) -> None:
6563
self.build_devhelp(self.outdir, self.config.devhelp_basename)
6664

67-
def build_devhelp(self, outdir: Path, outname: str) -> None:
65+
def build_devhelp(self, outdir: str | os.PathLike[str], outname: str) -> None:
6866
logger.info(__('dumping devhelp index...'))
6967

7068
# Basic info

0 commit comments

Comments
 (0)