MCPcopy Create free account
hub / github.com/idank/explainshell / parse_version

Function parse_version

tools/fetch_manned.py:35–43  ·  view source on GitHub ↗

Parse a version string into a tuple of integers for comparison.

(version_str)

Source from the content-addressed store, hash-verified

33
34
35def parse_version(version_str):
36 """Parse a version string into a tuple of integers for comparison."""
37 parts = []
38 for part in version_str.split("."):
39 try:
40 parts.append(int(part))
41 except ValueError:
42 parts.append(0)
43 return tuple(parts)
44
45
46DEFAULT_DUMP_BASE = "https://dl.manned.org"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected