Skip to content

Commit 0304553

Browse files
authored
feat: support comma separated scopes (#86)
2 parents 95c1ea1 + fceafb9 commit 0304553

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

conventional_pre_commit/format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def r_types(types):
2929
def r_scope(optional=True):
3030
"""Regex str for an optional (scope)."""
3131
if optional:
32-
return r"(\([\w \/:-]+\))?"
32+
return r"(\([\w \/:,-]+\))?"
3333
else:
34-
return r"(\([\w \/:-]+\))"
34+
return r"(\([\w \/:,-]+\))"
3535

3636

3737
def r_delim():

tests/test_format.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def test_r_scope__special_chars():
6161
assert regex.match("(some/thing)")
6262
assert regex.match("(some thing)")
6363
assert regex.match("(some:thing)")
64+
assert regex.match("(some,thing)")
6465

6566

6667
def test_r_delim():

0 commit comments

Comments
 (0)