MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / parse_version

Function parse_version

python/deprecation.py:35–40  ·  view source on GitHub ↗
(version: str)

Source from the content-addressed store, hash-verified

33
34# This is a patch applied to this library to allow specifying a deprecation version
35def parse_version(version: str) -> tuple:
36 match = re.match(r"^(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))?", version)
37 if match is None:
38 return (0,0,0)
39 groups = match.groupdict()
40 return (int(groups['major']), int(groups['minor']), int(groups['patch'] or '0'))
41
42
43class DeprecatedWarning(DeprecationWarning):

Callers 1

deprecatedFunction · 0.85

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected