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 6419ea4 commit 7ecbc2c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sphinxcontrib/devhelp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
from __future__ import annotations

import gzip
import os
import re
from os import path
from typing import TYPE_CHECKING, Any
from typing import Any

from docutils import nodes
from sphinx import addnodes
Expand All @@ -25,9 +26,6 @@
except ImportError:
import lxml.etree as etree # type: ignore

if TYPE_CHECKING:
from pathlib import Path

__version__ = '1.0.4'
__version_info__ = (1, 0, 4)

Expand Down Expand Up @@ -64,7 +62,7 @@ def init(self) -> None:
def handle_finish(self) -> None:
self.build_devhelp(self.outdir, self.config.devhelp_basename)

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

# Basic info
Expand Down

0 comments on commit 7ecbc2c

Please sign in to comment.