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/
This commit is contained in:
Iwo Herka 2018-05-30 17:12:09 +02:00
parent a050eb3504
commit 1813cacf1b

View file

@ -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):