Skip to content

Commit

Permalink
Update conf.py
Browse files Browse the repository at this point in the history
Co-authored-by: Stuart Mumford <[email protected]>
  • Loading branch information
wtbarnes and Cadair committed Sep 25, 2024
1 parent 33f857c commit 68df6ae
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions {{ cookiecutter.package_name }}/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down

0 comments on commit 68df6ae

Please sign in to comment.