aboutsummaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-08-28 17:24:35 -0400
committerRapptz <[email protected]>2015-08-28 17:24:35 -0400
commite60777e68b113b1f39f13c92c4a4d5b0ce0b406d (patch)
tree5f456249c338a509d7e7b6b7c278ecef88e45e84 /docs/conf.py
parentRemove unnecessary comment. (diff)
downloaddiscord.py-e60777e68b113b1f39f13c92c4a4d5b0ce0b406d.tar.xz
discord.py-e60777e68b113b1f39f13c92c4a4d5b0ce0b406d.zip
Document exceptions and change conf.py version detection.v0.4.1
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 4932b961..ab3aab2c 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -14,6 +14,7 @@
import sys
import os
+import re
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -53,9 +54,13 @@ copyright = u'2015, Rapptz'
# built documents.
#
# The short X.Y version.
-version = '0.4.0'
+
+version = ''
+with open('../discord/__init__.py') as f:
+ version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
+
# The full version, including alpha/beta/rc tags.
-release = '0.4.0'
+release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.