nip.utils.version.version_string_to_tuple#
- nip.utils.version.version_string_to_tuple(version_string: str) tuple[int, int, int] | tuple[int, int] | tuple[int] [source]#
Convert a version string to a tuple of integers.
- Parameters:
version_string (str) – The version string to convert. Must be in the format ‘x.y.z’, ‘x.y’, or ‘x’.
- Returns:
version_tuple (VersionTupleType) – The version string converted to a tuple of integers.
- Raises:
ValueError – If the version string is not in the format ‘x.y.z’, ‘x.y’, or ‘x’.