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 17
17
18
18
# -- Project information -----------------------------------------------------
19
19
20
- project = "django-upgrade"
20
+ with (here / ".." / "pyproject.toml" ).open ("rb" ) as fp :
21
+ pyproject_toml_data = tomllib .load (fp )
22
+
23
+ project = pyproject_toml_data ["project" ]["name" ]
21
24
copyright = "2021 Adam Johnson"
22
25
author = "Adam Johnson"
23
26
24
27
# The version info for the project you're documenting, acts as replacement
25
28
# for |version| and |release|, also used in various other places throughout
26
29
# the built documents.
27
30
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" ]
37
32
release = version
38
33
39
34
# -- General configuration ---------------------------------------------------
You can’t perform that action at this time.
0 commit comments