mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
move parse_version to pre_commit.clientlib
This commit is contained in:
parent
092e9a50ae
commit
5425c754a0
5 changed files with 13 additions and 14 deletions
|
|
@ -254,10 +254,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