MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / parse_version

Function parse_version

web/pgadmin/utils/versioned_template_loader.py:42–55  ·  view source on GitHub ↗
(template)

Source from the content-addressed store, hash-verified

40
41
42def parse_version(template):
43 template_path_parts = template.split("#", 3)
44 if len(template_path_parts) == 1:
45 return "", False
46
47 if len(template_path_parts) == 3:
48 _, version, _ = template_path_parts
49 return int(version), True
50
51 if len(template_path_parts) == 4:
52 _, _, version, _ = template_path_parts
53 return int(version), True
54
55 raise TemplateNotFound(template)
56
57
58def parse_template(template):

Callers 1

get_sourceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected