mirror of https://gitee.com/openkylin/qemu.git
qapi: Inheriting from object is pointless with Python 3, drop
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200304155932.20452-2-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
abfa865014
commit
baa310f1bb
|
@ -22,7 +22,7 @@
|
|||
from qapi.schema import QAPISchemaVisitor
|
||||
|
||||
|
||||
class QAPIGen(object):
|
||||
class QAPIGen:
|
||||
|
||||
def __init__(self, fname):
|
||||
self.fname = fname
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
from qapi.source import QAPISourceInfo
|
||||
|
||||
|
||||
class QAPISchemaParser(object):
|
||||
class QAPISchemaParser:
|
||||
|
||||
def __init__(self, fname, previously_included=None, incl_info=None):
|
||||
previously_included = previously_included or set()
|
||||
|
@ -293,7 +293,7 @@ def get_doc(self, info):
|
|||
raise QAPIParseError(self, "documentation comment must end with '##'")
|
||||
|
||||
|
||||
class QAPIDoc(object):
|
||||
class QAPIDoc:
|
||||
"""
|
||||
A documentation comment block, either definition or free-form
|
||||
|
||||
|
@ -312,7 +312,7 @@ class QAPIDoc(object):
|
|||
Free-form documentation blocks consist only of a body section.
|
||||
"""
|
||||
|
||||
class Section(object):
|
||||
class Section:
|
||||
def __init__(self, name=None):
|
||||
# optional section name (argument/member or section name)
|
||||
self.name = name
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
from qapi.parser import QAPISchemaParser
|
||||
|
||||
|
||||
class QAPISchemaEntity(object):
|
||||
class QAPISchemaEntity:
|
||||
meta = None
|
||||
|
||||
def __init__(self, name, info, doc, ifcond=None, features=None):
|
||||
|
@ -89,7 +89,7 @@ def describe(self):
|
|||
return "%s '%s'" % (self.meta, self.name)
|
||||
|
||||
|
||||
class QAPISchemaVisitor(object):
|
||||
class QAPISchemaVisitor:
|
||||
def visit_begin(self, schema):
|
||||
pass
|
||||
|
||||
|
@ -135,7 +135,7 @@ def visit_event(self, name, info, ifcond, arg_type, boxed):
|
|||
pass
|
||||
|
||||
|
||||
class QAPISchemaModule(object):
|
||||
class QAPISchemaModule:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self._entity_list = []
|
||||
|
@ -441,7 +441,7 @@ def visit(self, visitor):
|
|||
self.features)
|
||||
|
||||
|
||||
class QAPISchemaMember(object):
|
||||
class QAPISchemaMember:
|
||||
""" Represents object members, enum members and features """
|
||||
role = 'member'
|
||||
|
||||
|
@ -519,7 +519,7 @@ def check(self, schema):
|
|||
self.describe)
|
||||
|
||||
|
||||
class QAPISchemaObjectTypeVariants(object):
|
||||
class QAPISchemaObjectTypeVariants:
|
||||
def __init__(self, tag_name, info, tag_member, variants):
|
||||
# Flat unions pass tag_name but not tag_member.
|
||||
# Simple unions and alternates pass tag_member but not tag_name.
|
||||
|
@ -787,7 +787,7 @@ def visit(self, visitor):
|
|||
self.arg_type, self.boxed)
|
||||
|
||||
|
||||
class QAPISchema(object):
|
||||
class QAPISchema:
|
||||
def __init__(self, fname):
|
||||
self.fname = fname
|
||||
parser = QAPISchemaParser(fname)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
import sys
|
||||
|
||||
|
||||
class QAPISchemaPragma(object):
|
||||
class QAPISchemaPragma:
|
||||
def __init__(self):
|
||||
# Are documentation comments required?
|
||||
self.doc_required = False
|
||||
|
@ -23,7 +23,7 @@ def __init__(self):
|
|||
self.name_case_whitelist = []
|
||||
|
||||
|
||||
class QAPISourceInfo(object):
|
||||
class QAPISourceInfo:
|
||||
def __init__(self, fname, line, parent):
|
||||
self.fname = fname
|
||||
self.line = line
|
||||
|
|
Loading…
Reference in New Issue