Skip to content

Commit f59f761

Browse files
committed
Revert unnecessary path operation changes
1 parent e61f569 commit f59f761

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sphinx/project.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
import contextlib
66
import os
77
from glob import glob
8-
from pathlib import Path
98
from typing import TYPE_CHECKING
109

1110
from sphinx.locale import __
1211
from sphinx.util import logging
1312
from sphinx.util.matching import get_matching_files
14-
from sphinx.util.osutil import os_path, path_stabilize, relpath
13+
from sphinx.util.osutil import path_stabilize, relpath
1514

1615
if TYPE_CHECKING:
1716
from collections.abc import Iterable
@@ -25,7 +24,7 @@ class Project:
2524

2625
def __init__(self, srcdir: str | os.PathLike[str], source_suffix: Iterable[str]) -> None:
2726
#: Source directory.
28-
self.srcdir = Path(srcdir)
27+
self.srcdir = srcdir
2928

3029
#: source_suffix. Same as :confval:`source_suffix`.
3130
self.source_suffix = tuple(source_suffix)
@@ -115,7 +114,6 @@ def doc2path(self, docname: str, absolute: bool) -> str:
115114
# Backwards compatibility: the document does not exist
116115
filename = docname + self._first_source_suffix
117116

118-
filename = os_path(filename)
119117
if absolute:
120118
return os.path.join(self.srcdir, filename)
121119
return filename

0 commit comments

Comments
 (0)