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)
| 424 | |
| 425 | |
| 426 | def 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 | |
| 436 | def render_pep440_pre(pieces): |
no test coverage detected
searching dependent graphs…