summary refs log tree commit diff stats
path: root/scripts/qapi/schema.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2024-06-26 18:21:08 -0400
committerMarkus Armbruster <armbru@redhat.com>2024-07-06 08:58:24 +0200
commitf64e753149a0472e381246f0e06e5b293aa40541 (patch)
tree3efcc65a08b88571cc8486e8a635752a233cbf67 /scripts/qapi/schema.py
parentf2cb4026fccfe073f84a4b440e41d3ed0c3134f6 (diff)
downloadfocaccia-qemu-f64e753149a0472e381246f0e06e5b293aa40541.tar.gz
focaccia-qemu-f64e753149a0472e381246f0e06e5b293aa40541.zip
qapi: linter fixups
Fix minor irritants to pylint/flake8 et al.

(Yes, these need to be guarded by the Python tests. That's a work in
progress, a series that's quite likely to follow once I finish this
Sphinx project. Please pardon the temporary irritation.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240626222128.406106-3-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/schema.py')
-rw-r--r--scripts/qapi/schema.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py
index 721c470d2b..d65c35f6ee 100644
--- a/scripts/qapi/schema.py
+++ b/scripts/qapi/schema.py
@@ -730,6 +730,7 @@ class QAPISchemaVariants:
         for v in self.variants:
             v.set_defined_in(name)
 
+    # pylint: disable=unused-argument
     def check(
             self, schema: QAPISchema, seen: Dict[str, QAPISchemaMember]
     ) -> None:
@@ -1166,7 +1167,7 @@ class QAPISchema:
                 defn.info, "%s is already defined" % other_defn.describe())
         self._entity_dict[defn.name] = defn
 
-    def lookup_entity(self,name: str) -> Optional[QAPISchemaEntity]:
+    def lookup_entity(self, name: str) -> Optional[QAPISchemaEntity]:
         return self._entity_dict.get(name)
 
     def lookup_type(self, name: str) -> Optional[QAPISchemaType]:
@@ -1302,11 +1303,10 @@ class QAPISchema:
         name = 'q_obj_%s-%s' % (name, role)
         typ = self.lookup_entity(name)
         if typ:
-            assert(isinstance(typ, QAPISchemaObjectType))
+            assert isinstance(typ, QAPISchemaObjectType)
             # The implicit object type has multiple users.  This can
             # only be a duplicate definition, which will be flagged
             # later.
-            pass
         else:
             self._def_definition(QAPISchemaObjectType(
                 name, info, None, ifcond, None, None, members, None))