Skip to content

Commit 555dd1a

Browse files
author
Markus Armbruster
committed
qapi: Use re.fullmatch() where appropriate
Signed-off-by: Markus Armbruster <[email protected]> Message-Id: <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]>
1 parent d0830ee commit 555dd1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/qapi/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def check_if(expr: _JSONObject, info: QAPISourceInfo, source: str) -> None:
275275

276276
def _check_if(cond: Union[str, object]) -> None:
277277
if isinstance(cond, str):
278-
if not re.match(r'^[A-Z][A-Z0-9_]*$', cond):
278+
if not re.fullmatch(r'[A-Z][A-Z0-9_]*', cond):
279279
raise QAPISemError(
280280
info,
281281
"'if' condition '%s' of %s is not a valid identifier"

0 commit comments

Comments
 (0)