Skip to content

Commit

Permalink
update toml imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed May 6, 2024
1 parent f16e22a commit 4fe8e67
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
9 changes: 7 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
# All configuration values have a default value; values that are commented out
# serve to show the default value.

import toml

import sys, os
from pathlib import Path

config = toml.load("./sphinx.toml")
if sys.version_info > (3, 11):
import toml as tomllib
else:
import toml as tomllib

config = tomllib.load("./sphinx.toml")

# https://read-the-docs.readthedocs.io/en/latest/faq.html
ON_RTD = os.environ.get("READTHEDOCS", None) == "True"
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ black = [
"black",
]
doc = [
"docrepr",
"exceptiongroup",
"ipykernel",
"ipython[test]",
"matplotlib",
"setuptools>=18.5",
"sphinx>=1.3",
"sphinx-rtd-theme",
"sphinx>=1.3",
"sphinxcontrib-jquery",
"docrepr",
"matplotlib",
"stack_data",
"tomli ; python_version<'3.11'",
"typing_extensions",
"exceptiongroup",
"ipython[test]",
"toml",
]
kernel = [
"ipykernel",
Expand Down

0 comments on commit 4fe8e67

Please sign in to comment.