mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
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>
This commit is contained in:
parent
810aff8f29
commit
013a3aceb5
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ class QAPISchemaParser:
|
||||||
|
|
||||||
def check_list_str(name: str, value: object) -> List[str]:
|
def check_list_str(name: str, value: object) -> List[str]:
|
||||||
if (not isinstance(value, list) or
|
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(
|
raise QAPISemError(
|
||||||
info,
|
info,
|
||||||
"pragma %s must be a list of strings" % name)
|
"pragma %s must be a list of strings" % name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue