summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorJohn Snow2021-05-19 20:39:49 +0200
committerMarkus Armbruster2021-05-20 11:28:29 +0200
commit013a3aceb5b94710ee686cfa448458b1f170d78c (patch)
tree632cbc37fad562eab6958a7a4032f3d163a7eec0 /scripts/qapi/parser.py
parentqapi/parser: add type hint annotations (diff)
downloadqemu-013a3aceb5b94710ee686cfa448458b1f170d78c.tar.gz
qemu-013a3aceb5b94710ee686cfa448458b1f170d78c.tar.xz
qemu-013a3aceb5b94710ee686cfa448458b1f170d78c.zip
qapi/parser: Remove superfluous list comprehension
A generator suffices (and quiets a pylint warning). Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210519183951.3946870-14-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/parser.py')
-rw-r--r--scripts/qapi/parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 419e36c870..b0f18c0d17 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -176,7 +176,7 @@ class QAPISchemaParser:
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)