Skip to content

Commit bbd731d

Browse files
committed
MNT: Fetch authors a bit more directly
1 parent 5747e4a commit bbd731d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/source/conf.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
fobj.write(rel['long_description'])
5656

5757
# Load metadata from setup.cfg
58-
with open(Path("../../pyproject.toml"), 'rb') as f:
59-
pyproject_dict = tomllib.load(f)
60-
metadata = pyproject_dict["project"]
58+
with open(Path("../../pyproject.toml"), 'rb') as fobj:
59+
pyproject = tomllib.load(fobj)
60+
authors = pyproject["project"]["authors"][0]
6161

6262
# Add any Sphinx extension module names here, as strings. They can be
6363
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
@@ -91,9 +91,7 @@
9191

9292
# General information about the project.
9393
project = u'NiBabel'
94-
author_name = metadata["authors"][0]["name"]
95-
author_email = metadata["authors"][0]["email"]
96-
copyright = f"2006-2022, {author_name} <{author_email}>"
94+
copyright = f"2006-2022, {authors['name']} <{authors['email']}>"
9795

9896
# The version info for the project you're documenting, acts as replacement for
9997
# |version| and |release|, also used in various other places throughout the

0 commit comments

Comments
 (0)