def _len_version(v_list: list) ->int:
    """ Compute length of the component, but without the last component if it is a dev or post"""
    l = len(v_list)
    return l - 1 if v_list[-1].startswith('dev') or v_list[-1].startswith(
        'post') else l
