jenkins-bot submitted this change.
[IMPR] Use pywikibot.__version__ for version informations
detached from I7ffe9096f
Bug: T197936
Change-Id: Id23a279afabe8501c9658e9d5e222cf3d0d7894e
---
M docs/conf.py
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index 6b934c4..4b42f93 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -30,6 +30,9 @@
sys.path.insert(0, repo_dir)
os.chdir(repo_dir)
+os.environ['PYWIKIBOT_NO_USER_CONFIG'] = '1'
+import pywikibot # noqa: E402
+
# -- General configuration ----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
@@ -67,11 +70,7 @@
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
-#
-# The short X.Y version.
-version = '3.0'
-# The full version, including alpha/beta/rc tags.
-release = '3.0.20200609'
+version = release = pywikibot.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -256,11 +255,6 @@
# texinfo_show_urls = 'footnote'
-def pywikibot_env():
- """Allow pywikibot modules to be imported without a user-config.py."""
- os.environ['PYWIKIBOT_NO_USER_CONFIG'] = '1'
-
-
def pywikibot_script_docstring_fixups(app, what, name, obj, options, lines):
"""Pywikibot specific conversions."""
from scripts.cosmetic_changes import warning
@@ -357,8 +351,6 @@
app.add_autodoc_attrgetter(type, pywikibot_family_classproperty_getattr)
-pywikibot_env()
-
autodoc_default_options = {
'members': True,
'undoc-members': True,
To view, visit change 608419. To unsubscribe, or for help writing mail filters, visit settings.