Skip to content

Commit 2d67064

Browse files
committed
refactor: Standardise Python open parenthesesis error
1 parent 1286aa8 commit 2d67064

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/cucumber_tag_expressions/parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,10 @@ def ensure_expected_token_type(token_type, index):
275275
last_operation = operations.pop()
276276
if last_operation is Token.OPEN_PARENTHESIS:
277277
# -- CASE: TOO MANY OPEN-PARENTHESIS
278-
message = "Unclosed '(': Too many open-parens in: %s" % text
278+
message = (
279+
'Tag expression "%s" could not be parsed because of syntax error:'
280+
' Unmatched (.' % text
281+
)
279282
raise TagExpressionError(message)
280283
cls._push_expression(last_operation, expressions)
281284

0 commit comments

Comments
 (0)