(left: List[str], right: List[str])
| 683 | |
| 684 | |
| 685 | def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]: |
| 686 | left_split, right_split = [], [] |
| 687 | |
| 688 | # Get the release segment of our versions |
| 689 | left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) |
| 690 | right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) |
| 691 | |
| 692 | # Get the rest of our versions |
| 693 | left_split.append(left[len(left_split[0]) :]) |
| 694 | right_split.append(right[len(right_split[0]) :]) |
| 695 | |
| 696 | # Insert our padding |
| 697 | left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) |
| 698 | right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) |
| 699 | |
| 700 | return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split))) |
| 701 | |
| 702 | |
| 703 | class SpecifierSet(BaseSpecifier): |
no test coverage detected