We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b060ca4 commit c7a3687Copy full SHA for c7a3687
docs/source/conf.py
@@ -19,13 +19,17 @@
19
#
20
import os
21
import sys
22
-import tomllib
+if sys.version_info < (3, 11):
23
+ from tomli import load as load_toml
24
+else:
25
+ from tomllib import load as load_toml
26
+
27
28
sys.path.insert(0, os.path.abspath('../..'))
29
def get_project_metadata():
30
path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../pyproject.toml"))
31
with open(path, "rb") as f:
- return tomllib.load(f)['project']
32
+ return load_toml(f)['project']
33
34
metadata = get_project_metadata()
35
0 commit comments