qapi/schema: add pylint suppressions
authorJohn Snow <jsnow@redhat.com>
Fri, 15 Mar 2024 15:22:40 +0000 (16:22 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 24 Apr 2024 08:03:54 +0000 (10:03 +0200)
With this patch, pylint is happy with the file, so enable it in the
configuration.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240315152301.3621858-5-armbru@redhat.com>

scripts/qapi/pylintrc
scripts/qapi/schema.py

index 1342412c3cfd89f938407f07582dbf352573dd17..c028a1f9f519534be04787f809abb5b5d53fb981 100644 (file)
@@ -1,10 +1,5 @@
 [MASTER]
 
-# Add files or directories matching the regex patterns to the ignore list.
-# The regex matches against base names, not paths.
-ignore-patterns=schema.py,
-
-
 [MESSAGES CONTROL]
 
 # Disable the message, report, category or checker with the given id(s). You
index 8ba5665bc68bf7a6f8f9bd92a5e1d9d82de84b43..117f0f78f0c3ee1649e47087642abc388f8e8479 100644 (file)
@@ -12,6 +12,8 @@
 # This work is licensed under the terms of the GNU GPL, version 2.
 # See the COPYING file in the top-level directory.
 
+# pylint: disable=too-many-lines
+
 # TODO catching name collisions in generated code would be nice
 
 from collections import OrderedDict
@@ -83,6 +85,7 @@ class QAPISchemaEntity:
         return c_name(self.name)
 
     def check(self, schema):
+        # pylint: disable=unused-argument
         assert not self._checked
         seen = {}
         for f in self.features:
@@ -113,6 +116,7 @@ class QAPISchemaEntity:
         return not self.info
 
     def visit(self, visitor):
+        # pylint: disable=unused-argument
         assert self._checked
 
     def describe(self):
@@ -131,6 +135,7 @@ class QAPISchemaVisitor:
         pass
 
     def visit_needed(self, entity):
+        # pylint: disable=unused-argument
         # Default to visiting everything
         return True