Skip to content

Commit e02a95f

Browse files
c0llab0rat0rntninja
authored andcommittedMay 30, 2021
Use pathlib.Path to construct import in publish.py
1 parent 9786643 commit e02a95f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎docs/publish.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#!/usr/bin/python3
22
import os
3+
from pathlib import Path
4+
35
import sphinx.cmd.build
46
import sys
57
import typing as ty
68

7-
script_dir = os.path.dirname(os.path.realpath(__file__))
8-
sys.path.insert(0, os.path.join(script_dir, ".."))
9+
script_dir = Path(__file__).absolute().parent
10+
sys.path.insert(0, str(script_dir.parent))
911

1012
import ipfshttpclient
1113

0 commit comments

Comments
 (0)
Please sign in to comment.