Skip to content

Commit 4330523

Browse files
committed
fixing string parsing on regex
1 parent 49e4229 commit 4330523

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

commit_msg_regex_hook/commit_msg_regex_hook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def process_pattern(pattern_str: str) -> Pattern:
8383
"""
8484
try:
8585
print(f"Incoming Pattern: {pattern_str}")
86-
pattern = re.compile(pattern_str)
86+
pattern = re.compile(pattern_str[1:-1])
8787
except Exception as e:
8888
raise argparse.ArgumentTypeError(
8989
f"'{pattern_str}' is not a valid regex pattern\n {e}"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = commit-msg-regex-hook
3-
version = v0.0.7
3+
version = v0.0.8
44
author = David Tippett
55
description = Checks if commit message matches supplied regex
66
long_description = file: README.md

0 commit comments

Comments
 (0)