MCPcopy
hub / github.com/docker/docker-py / parse

Method parse

scripts/versions.py:20–31  ·  view source on GitHub ↗
(cls, version)

Source from the content-addressed store, hash-verified

18
19 @classmethod
20 def parse(cls, version):
21 edition = None
22 version = version.lstrip('v')
23 version, _, stage = version.partition('-')
24 if stage:
25 if not any(marker in stage for marker in STAGES):
26 edition = stage
27 stage = None
28 elif '-' in stage:
29 edition, stage = stage.split('-', 1)
30 major, minor, patch = version.split('.', 2)
31 return cls(major, minor, patch, stage, edition)
32
33 @property
34 def major_minor(self):

Callers 2

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected