mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Brush off some (py)lint
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200304155932.20452-5-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
2cae67bcb5
commit
8ec0e1a4e6
6 changed files with 15 additions and 18 deletions
|
@ -35,7 +35,6 @@ def check_name_is_str(name, info, source):
|
|||
def check_name_str(name, info, source,
|
||||
allow_optional=False, enum_member=False,
|
||||
permit_upper=False):
|
||||
global valid_name
|
||||
membername = name
|
||||
|
||||
if allow_optional and name.startswith('*'):
|
||||
|
@ -249,7 +248,7 @@ def check_union(expr, info):
|
|||
def check_alternate(expr, info):
|
||||
members = expr['data']
|
||||
|
||||
if len(members) == 0:
|
||||
if not members:
|
||||
raise QAPISemError(info, "'data' must not be empty")
|
||||
for (key, value) in members.items():
|
||||
source = "'data' member '%s'" % key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue