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

Function pep440_split_post

monai/_version.py:426–433  ·  view source on GitHub ↗

Split pep440 version string at the post-release segment. Returns the release segments before the post-release and the post-release version number (or -1 if no post-release segment is present).

(ver)

Source from the content-addressed store, hash-verified

424
425
426def pep440_split_post(ver):
427 """Split pep440 version string at the post-release segment.
428
429 Returns the release segments before the post-release and the
430 post-release version number (or -1 if no post-release segment is present).
431 """
432 vc = str.split(ver, ".post")
433 return vc[0], int(vc[1] or 0) if len(vc) == 2 else None
434
435
436def render_pep440_pre(pieces):

Callers 1

render_pep440_preFunction · 0.70

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…