Skip to content

Commit fa34180

Browse files
committed
docs(conf): Use pathlib
1 parent dfaeda4 commit fa34180

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
import os
44
import sys
55
from os.path import dirname, relpath
6+
from pathlib import Path
67

78
import libtmux # NOQA
89
from libtmux import test # NOQA
910

1011
# Get the project root dir, which is the parent dir of this
11-
cwd = os.getcwd()
12-
project_root = os.path.dirname(cwd)
12+
cwd = Path.cwd()
13+
project_root = cwd.parent
1314

14-
sys.path.insert(0, project_root)
15+
sys.path.insert(0, str(project_root))
16+
sys.path.insert(0, str(cwd / "_ext"))
1517

1618

1719
# package data

0 commit comments

Comments
 (0)