We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb0ef54 commit 9493671Copy full SHA for 9493671
docs/conf.py
@@ -1,6 +1,16 @@
1
import datetime as dt
2
import os
3
+import re
4
import sys
5
+from pathlib import Path
6
+
7
+MATCH_VERSION_LINE = re.compile(r"version = \W((\d+\.\d+)\.\d.*?)\W").fullmatch
8
9
+pyproject = Path(__file__).parent.parent / "pyproject.toml"
10
+version_line_match = next(
11
+ filter(None, map(MATCH_VERSION_LINE, pyproject.read_text().splitlines()))
12
+)
13
+release, version = version_line_match.groups()
14
15
sys.path.insert(0, os.path.abspath(".."))
16
@@ -17,9 +27,6 @@
17
27
project = "Confuse"
18
28
copyright = "2012-{}, Adrian Sampson & contributors".format(dt.date.today().year)
19
29
20
-version = "2.1"
21
-release = "2.1.1"
22
-
23
30
exclude_patterns = ["_build"]
24
31
25
32
pygments_style = "sphinx"
0 commit comments