st2common/st2common/util/pack.py
def normalize_pack_version(version):
    """
    Normalize old, pre StackStorm v2.1 non valid semver version string (e.g. 0.2) to a valid
    semver version string (0.2.0).

    :rtype: ``str``
    """
    version = str(version)

    version_seperator_count = version.count('.')
    if version_seperator_count == 1:
        version = version + '.0'

    return version

    Normalize old, pre StackStorm v2.1 non valid semver version string (e.g. 0.2) to a valid
    semver version string (0.2.0).

    :rtype: ``str``
    
Normalize old, pre StackStorm v2.1 non valid semver version string  to a valid
semver version string (0.2.0).
Normalize old pre StackStorm v2 . 1 non valid semver version string to a valid semver version string ( 0 . 2 . 0 ) .
def normalize_pack_version(version):
    version = str(version)
    version_seperator_count = version.count('.')
    if version_seperator_count == 1:
        version = version + '.0'
    return version
def normalize_pack_version ( version ) : version = str ( version ) version_seperator_count = version . count ( '.' ) if version_seperator_count == 1 : version = version + '.0' return version
Normalize old, pre StackStorm v2.1 non valid semver version string (e.g.
Normalize old pre StackStorm v2 . 1 non valid semver version string ( e . g .
"""
    Normalize old, pre StackStorm v2.1 non valid semver version string (e.g. 0.2) to a valid
    semver version string (0.2.0).

    :rtype: ``str``
    """
None
``str``
version