MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / render_pep440_old

Function render_pep440_old

monai/_version.py:516–535  ·  view source on GitHub ↗

TAG[.postDISTANCE[.dev0]] . The ".dev0" means dirty. Exceptions: 1: no tags. 0.postDISTANCE[.dev0]

(pieces)

Source from the content-addressed store, hash-verified

514
515
516def render_pep440_old(pieces):
517 """TAG[.postDISTANCE[.dev0]] .
518
519 The ".dev0" means dirty.
520
521 Exceptions:
522 1: no tags. 0.postDISTANCE[.dev0]
523 """
524 if pieces["closest-tag"]:
525 rendered = pieces["closest-tag"]
526 if pieces["distance"] or pieces["dirty"]:
527 rendered += ".post%d" % pieces["distance"]
528 if pieces["dirty"]:
529 rendered += ".dev0"
530 else:
531 # exception #1
532 rendered = "0.post%d" % pieces["distance"]
533 if pieces["dirty"]:
534 rendered += ".dev0"
535 return rendered
536
537
538def render_git_describe(pieces):

Callers 1

renderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…