mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Merge pull request #2665 from pre-commit/move-parse-version
move parse_version to pre_commit.clientlib
This commit is contained in:
commit
017fa5c0b8
5 changed files with 13 additions and 14 deletions
|
|
@ -241,10 +241,5 @@ def rmtree(path: str) -> None:
|
|||
shutil.rmtree(path, ignore_errors=False, onerror=handle_remove_readonly)
|
||||
|
||||
|
||||
def parse_version(s: str) -> tuple[int, ...]:
|
||||
"""poor man's version comparison"""
|
||||
return tuple(int(p) for p in s.split('.'))
|
||||
|
||||
|
||||
def win_exe(s: str) -> str:
|
||||
return s if sys.platform != 'win32' else f'{s}.exe'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue