From 7a8b1100e9b7988bfaca44259e330ecf6d591c22 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 26 Mar 2021 10:52:39 +0000 Subject: [PATCH] config.py: Remove static_appversion_nobuild, and point to functions * Also renamed static_appversion to have leading _ to further discourage use. --- config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config.py b/config.py index 2b83f0b4..a3d30c71 100644 --- a/config.py +++ b/config.py @@ -39,9 +39,8 @@ appcmdname = 'EDMC' # appversion **MUST** follow Semantic Versioning rules: # # Major.Minor.Patch(-prerelease)(+buildmetadata) -static_appversion = '5.0.0-beta1' -# For some things we want appversion without (possible) +build metadata -static_appversion_nobuild = str(semantic_version.Version(static_appversion).truncate('prerelease')) +# NB: Do *not* import this, use the functions appversion() and appversion_nobuild() +_static_appversion = '5.0.0-beta1' copyright = '© 2015-2019 Jonathan Harris, 2020-2021 EDCD' update_feed = 'https://raw.githubusercontent.com/EDCD/EDMarketConnector/releases/edmarketconnector.xml' @@ -140,7 +139,7 @@ def appversion() -> str: if shorthash is None: shorthash = 'UNKNOWN' - return f'{static_appversion}+{shorthash}' + return f'{_static_appversion}+{shorthash}' def appversion_nobuild() -> str: