aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-03-24 20:59:48 +0000
committerGravatar Chris Lovering <[email protected]>2024-03-24 20:59:48 +0000
commit4b09c30c869b1ee8dc879efeab2891583b4ae49d (patch)
tree59c7adefbf9023d64ce074fac1aa71cdca626083 /docs
parentBump dev deps to latest (diff)
Ensure project root is on sys path before importing the docs module
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 94246fe4..fb04d245 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -19,6 +19,8 @@ logger = sphinx.util.logging.getLogger(__name__)
# Handle the path not being set correctly in actions.
sys.path.insert(0, Path("..").resolve())
+PROJECT_ROOT = Path(__file__).parent.parent
+sys.path.insert(0, str(PROJECT_ROOT.absolute()))
from docs import utils # noqa: E402
@@ -30,9 +32,6 @@ author = "Python Discord"
REPO_LINK = "https://github.com/python-discord/bot-core"
-PROJECT_ROOT = Path(__file__).parent.parent
-sys.path.insert(0, str(PROJECT_ROOT.absolute()))
-
# The full version, including alpha/beta/rc tags
release = version = tomli.loads(
(PROJECT_ROOT / "pyproject.toml").read_text(encoding="utf-8")