From 1813cacf1b68d2728dece7bf0b34ff07ca092c18 Mon Sep 17 00:00:00 2001 From: Iwo Herka Date: Wed, 30 May 2018 17:12:09 +0200 Subject: [PATCH] Simplify assignment to __version__ This commit removes `get_version` helper which is completely useless and not used anywhere else, i.e. from now on `__version__` is assigned directly. As a side-effect, this makes patch number always visible in the version number. This is correct behavior; there is no reason to hide it when it equals 0. Links: https://semver.org/ --- eav/__init__.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/eav/__init__.py b/eav/__init__.py index b6e368d..709ff58 100644 --- a/eav/__init__.py +++ b/eav/__init__.py @@ -1,12 +1,4 @@ -VERSION = (0, 9, 2) - -def get_version(): - version = "%s.%s" % (VERSION[0], VERSION[1]) - if VERSION[2] != 0: - version = "%s.%s" % (version, VERSION[2]) - return version - -__version__ = get_version() +__version__ = '0.9.2' def register(model_cls, config_cls=None):