Skip to content

Commit

Permalink
import tomli as tomllib
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett authored and WilliamJamieson committed Mar 13, 2023
1 parent 809607c commit bebdbf1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import importlib
import stsci_rtd_theme
import sys
import tomli
if sys.version_info < (3, 11):
import tomli as tomllib
else:
import tomllib
from datetime import datetime
from pathlib import Path

Expand All @@ -22,7 +25,7 @@ def setup(app):
# Read the package's `pyproject.toml` so that we can use relevant
# values here:
with open(REPO_ROOT / "pyproject.toml", "rb") as configuration_file:
conf = tomli.load(configuration_file)
conf = tomllib.load(configuration_file)
setup_metadata = conf['project']

project = setup_metadata["name"]
Expand Down

0 comments on commit bebdbf1

Please sign in to comment.