summaryrefslogtreecommitdiffstats
path: root/pre_commit/util.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:23:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:23:44 +0000
commit8b9f67e46f462980dd0877e752954a07bfecdb32 (patch)
tree7455f28cae7a78fdec431903475978bbff39f984 /pre_commit/util.py
parentAdding upstream version 2.14.0. (diff)
downloadpre-commit-8b9f67e46f462980dd0877e752954a07bfecdb32.tar.xz
pre-commit-8b9f67e46f462980dd0877e752954a07bfecdb32.zip
Adding upstream version 2.15.0.upstream/2.15.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/util.py')
-rw-r--r--pre_commit/util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pre_commit/util.py b/pre_commit/util.py
index b5f40ad..6bf8ae7 100644
--- a/pre_commit/util.py
+++ b/pre_commit/util.py
@@ -268,3 +268,7 @@ def rmtree(path: str) -> None:
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'