From 68df6ae634405d809b40d28bd14e6b8a5b240485 Mon Sep 17 00:00:00 2001 From: Will Barnes Date: Wed, 25 Sep 2024 07:17:40 -0400 Subject: [PATCH] Update conf.py Co-authored-by: Stuart Mumford --- {{ cookiecutter.package_name }}/docs/conf.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/{{ cookiecutter.package_name }}/docs/conf.py b/{{ cookiecutter.package_name }}/docs/conf.py index 1789d57..fb8fa45 100644 --- a/{{ cookiecutter.package_name }}/docs/conf.py +++ b/{{ cookiecutter.package_name }}/docs/conf.py @@ -13,16 +13,15 @@ # The full version, including alpha/beta/rc tags from {{ cookiecutter.module_name }} import __version__ -_version_ = Version(__version__) -# NOTE: Avoid "post" appearing in version string in rendered docs -if _version_.is_postrelease: - version = release = _version_.base_version -# NOTE: Avoid long githashes in rendered Sphinx docs -elif _version_.is_devrelease: - version = release = f'{_version_.base_version}.dev{_version_.dev}' -else: - version = release = str(_version_) -is_development = _version_.is_devrelease +_version = Version(__version__) +version = release = str(_version) +# Avoid "post" appearing in version string in rendered docs +if _version.is_postrelease: + version = release = _version.base_version +# Avoid long githashes in rendered Sphinx docs +elif _version.is_devrelease: + version = release = f'{_version.base_version}.dev{_version.dev}' +is_development = _version.is_devrelease project = "{{ cookiecutter.package_name }}" author = "{{ cookiecutter.author_name }}"