Skip to content

Commit

Permalink
Use os.PathLike over pathlib.Path
Browse files Browse the repository at this point in the history
Sphinx 7.1 and earlier don't use ``pathlib`` internally.
  • Loading branch information
AA-Turner committed Aug 14, 2023
1 parent 5c3bbc6 commit e6cfdf3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sphinxcontrib/htmlhelp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import html
import os
from os import path
from pathlib import Path
from typing import Any

from docutils import nodes
Expand Down Expand Up @@ -256,7 +255,7 @@ def build_toc_file(self) -> None:
}
f.write(self.render('project.hhc', context))

def build_hhx(self, outdir: Path, outname: str) -> None:
def build_hhx(self, outdir: str | os.PathLike[str], outname: str) -> None:
logger.info(__('writing index file...'))
index = IndexEntries(self.env).create_index(self)
filename = path.join(outdir, outname + '.hhk')
Expand Down

0 comments on commit e6cfdf3

Please sign in to comment.