The hooke module does all the legwork for Hooke.
To facilitate faster loading, submodules are not imported by default. The available submodules are:
Return a nicely formatted version string.:
major.minor.release.type[.patch] (name)
Examples
Since I seem to be unable to override __version__ in a Doctest, we’ll pass the version tuple in as an argument. You can ignore version_tuple.
>>> v = (1, 2, 3, 'devel', '20100501', 'Kenzo')
If depth -1, a full version string is returned
>>> version(depth=-1, version_tuple=v)
'1.2.3.devel.20100501 (Kenzo)'
Otherwise, only the first depth fields are used.
>>> version(depth=3, version_tuple=v)
'1.2.3'
>>> version(depth=4, version_tuple=v)
'1.2.3.devel'
Here’s an example dropping the patch.
>>> v = (1, 2, 3, 'devel', None, 'Kenzo')
>>> version(depth=-1, version_tuple=v)
'1.2.3.devel (Kenzo)'