Skip to content

Commit 37cc686

Browse files
committed
fix: suffix
1 parent aa3c0e6 commit 37cc686

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sync_uv_pre_commit/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def process(
145145
hook_rev = hooks[arg["hook_id"]]
146146

147147
prefix, suffix = arg.get("prefix", ""), arg.get("suffix", "")
148-
if hook_rev.startswith(prefix): # FIXME: python3.9+
148+
if prefix and hook_rev.startswith(prefix): # FIXME: python3.9+
149149
hook_rev = hook_rev[len(prefix) :]
150-
if hook_rev.endswith(suffix):
150+
if suffix and hook_rev.endswith(suffix):
151151
hook_rev = hook_rev[: -len(suffix)]
152152

153153
if specifier.contains(hook_rev):

0 commit comments

Comments
 (0)