MCPcopy Create free account
hub / github.com/apache/solr / parse

Method parse

dev-tools/scripts/scriptutil.py:40–46  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

38
39 @classmethod
40 def parse(cls, value):
41 match = re.search(r'(\d+)\.(\d+).(\d+)(.1|.2)?', value)
42 if match is None:
43 raise argparse.ArgumentTypeError('Version argument must be of format x.y.z(.1|.2)?')
44 parts = [int(v) for v in match.groups()[:-1]]
45 parts.append({ None: 0, '.1': 1, '.2': 2 }[match.groups()[-1]])
46 return Version(*parts)
47
48 def __str__(self):
49 return self.dot

Callers 15

warnCeilingMethod · 0.95
mainFunction · 0.45
set_release_versionMethod · 0.45
set_latest_versionMethod · 0.45
get_main_versionMethod · 0.45
get_base_branch_nameMethod · 0.45
get_minor_branch_nameMethod · 0.45

Calls 3

VersionClass · 0.70
appendMethod · 0.65
searchMethod · 0.45

Tested by 2

warnCeilingMethod · 0.76