Skip to content

Commit ef6718d

Browse files
committed
Simplify version number import in docs
1 parent 9a2c2f9 commit ef6718d

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

docs/conf.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313
import os
14-
import re
1514
import sys
1615

1716

@@ -65,11 +64,8 @@ def __getattr__(self, name):
6564
# built documents.
6665
#
6766
# The full version, including alpha/beta/rc tags.
68-
release = ''
69-
here = os.path.abspath(os.path.dirname(__file__))
70-
with open(os.path.join(here, '..', 'kazoo', 'version.py')) as f:
71-
release = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
72-
f.read(), re.MULTILINE).group(1)
67+
from kazoo import version
68+
release = version.__version__
7369

7470
# The short X.Y version.
7571
version = '.'.join(release.split('.')[:-1])

0 commit comments

Comments
 (0)