-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
53 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
from sphinx.application import Sphinx | ||
from pathlib import Path | ||
|
||
import os | ||
from sphinx.application import Sphinx | ||
|
||
|
||
def includes_directory(file_path: str): | ||
# Check for backslash or forward slash as we don't know what platform we're on and sometimes | ||
# the doxygen paths will have forward slash even on Windows. | ||
return bool(file_path.count("\\")) or bool(file_path.count("/")) | ||
return bool(str(file_path).count("\\")) or bool(str(file_path).count("/")) | ||
|
||
|
||
def resolve_path(app: Sphinx, directory: str, filename: str): | ||
"""Returns a full path to the filename in the given directory assuming that if the directory | ||
path is relative, then it is relative to the conf.py directory. | ||
""" | ||
|
||
# os.path.join does the appropriate handling if _project_path is an absolute path | ||
return os.path.join(app.confdir, directory, filename) | ||
return Path(app.confdir, directory, filename).resolve() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters