Skip to content

Commit

Permalink
Revert unnecessary path operation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jul 18, 2024
1 parent e61f569 commit f59f761
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sphinx/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
import contextlib
import os
from glob import glob
from pathlib import Path
from typing import TYPE_CHECKING

from sphinx.locale import __
from sphinx.util import logging
from sphinx.util.matching import get_matching_files
from sphinx.util.osutil import os_path, path_stabilize, relpath
from sphinx.util.osutil import path_stabilize, relpath

if TYPE_CHECKING:
from collections.abc import Iterable
Expand All @@ -25,7 +24,7 @@ class Project:

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

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

filename = os_path(filename)
if absolute:
return os.path.join(self.srcdir, filename)
return filename

0 comments on commit f59f761

Please sign in to comment.