File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 1717
1818# -- Project information -----------------------------------------------------
1919
20- project = "django-htmx"
20+ with (here / ".." / "pyproject.toml" ).open ("rb" ) as fp :
21+ pyproject_toml_data = tomllib .load (fp )
22+
23+ project = pyproject_toml_data ["project" ]["name" ]
2124copyright = "2020 Adam Johnson"
2225author = "Adam Johnson"
2326
2427# The version info for the project you're documenting, acts as replacement
2528# for |version| and |release|, also used in various other places throughout
2629# the built documents.
2730
28-
29- def _get_version () -> str :
30- with (here / ".." / "pyproject.toml" ).open ("rb" ) as fp :
31- data = tomllib .load (fp )
32- version : str = data ["project" ]["version" ]
33- return version
34-
35-
36- version = _get_version ()
31+ version = pyproject_toml_data ["project" ]["version" ]
3732release = version
3833
3934# -- General configuration ---------------------------------------------------
You can’t perform that action at this time.
0 commit comments