From 006224c13e9938feb3383275041f573ce1ca3c0d Mon Sep 17 00:00:00 2001 From: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com> Date: Mon, 20 May 2024 18:02:32 +0200 Subject: [PATCH] User `telegram.__version__` in Sphinx Configuration One place less to update during the release :) --- docs/source/conf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index a50e3dbdb05..5858a79e2da 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,9 +20,13 @@ # built documents. # # The short X.Y version. -version = "21.2" # telegram.__version__[:3] + +# Import needs to be below the sys.path.insert above +import telegram # noqa: E402 + +version = telegram.__version__ # The full version, including alpha/beta/rc tags. -release = "21.2" # telegram.__version__ +release = telegram.__version__ # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = "6.1.3"