mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
qapi: Make pylint a bit happier
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1489582656-31133-47-git-send-email-armbru@redhat.com>
This commit is contained in:
parent
6bbfb12de6
commit
c261394978
3 changed files with 7 additions and 8 deletions
|
@ -13,7 +13,6 @@
|
||||||
# See the COPYING file in the top-level directory.
|
# See the COPYING file in the top-level directory.
|
||||||
|
|
||||||
from qapi import *
|
from qapi import *
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
def gen_command_decl(name, arg_type, boxed, ret_type):
|
def gen_command_decl(name, arg_type, boxed, ret_type):
|
||||||
|
@ -84,7 +83,8 @@ static void qmp_marshal_output_%(c_name)s(%(c_type)s ret_in, QObject **ret_out,
|
||||||
|
|
||||||
|
|
||||||
def gen_marshal_proto(name):
|
def gen_marshal_proto(name):
|
||||||
return 'void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)' % c_name(name)
|
return ('void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)'
|
||||||
|
% c_name(name))
|
||||||
|
|
||||||
|
|
||||||
def gen_marshal_decl(name):
|
def gen_marshal_decl(name):
|
||||||
|
@ -198,7 +198,7 @@ def gen_register_command(name, success_response):
|
||||||
options = 'QCO_NO_SUCCESS_RESP'
|
options = 'QCO_NO_SUCCESS_RESP'
|
||||||
|
|
||||||
ret = mcgen('''
|
ret = mcgen('''
|
||||||
qmp_register_command(cmds, "%(name)s",
|
qmp_register_command(cmds, "%(name)s",
|
||||||
qmp_marshal_%(c_name)s, %(opts)s);
|
qmp_marshal_%(c_name)s, %(opts)s);
|
||||||
''',
|
''',
|
||||||
name=name, c_name=c_name(name),
|
name=name, c_name=c_name(name),
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# See the COPYING file in the top-level directory.
|
# See the COPYING file in the top-level directory.
|
||||||
|
|
||||||
from qapi import *
|
from qapi import *
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
def gen_visit_decl(name, scalar=False):
|
def gen_visit_decl(name, scalar=False):
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
# This work is licensed under the terms of the GNU GPL, version 2.
|
# This work is licensed under the terms of the GNU GPL, version 2.
|
||||||
# See the COPYING file in the top-level directory.
|
# See the COPYING file in the top-level directory.
|
||||||
|
|
||||||
import re
|
|
||||||
from ordereddict import OrderedDict
|
|
||||||
import errno
|
import errno
|
||||||
import getopt
|
import getopt
|
||||||
import os
|
import os
|
||||||
import sys
|
import re
|
||||||
import string
|
import string
|
||||||
|
import sys
|
||||||
|
from ordereddict import OrderedDict
|
||||||
|
|
||||||
builtin_types = {
|
builtin_types = {
|
||||||
'str': 'QTYPE_QSTRING',
|
'str': 'QTYPE_QSTRING',
|
||||||
|
@ -1587,7 +1587,7 @@ class QAPISchema(object):
|
||||||
tag_member = None
|
tag_member = None
|
||||||
if isinstance(base, dict):
|
if isinstance(base, dict):
|
||||||
base = (self._make_implicit_object_type(
|
base = (self._make_implicit_object_type(
|
||||||
name, info, doc, 'base', self._make_members(base, info)))
|
name, info, doc, 'base', self._make_members(base, info)))
|
||||||
if tag_name:
|
if tag_name:
|
||||||
variants = [self._make_variant(key, value)
|
variants = [self._make_variant(key, value)
|
||||||
for (key, value) in data.iteritems()]
|
for (key, value) in data.iteritems()]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue