Skip to content
Snippets Groups Projects
Commit 013a3ace authored by John Snow's avatar John Snow Committed by Markus Armbruster
Browse files

qapi/parser: Remove superfluous list comprehension


A generator suffices (and quiets a pylint warning).

Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
Message-Id: <20210519183951.3946870-14-jsnow@redhat.com>
Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
parent 810aff8f
No related branches found
No related tags found
No related merge requests found
......@@ -176,7 +176,7 @@ def _pragma(name: str, value: object, info: QAPISourceInfo) -> None:
def check_list_str(name: str, value: object) -> List[str]:
if (not isinstance(value, list) or
any([not isinstance(elt, str) for elt in value])):
any(not isinstance(elt, str) for elt in value)):
raise QAPISemError(
info,
"pragma %s must be a list of strings" % name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment