[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/25] qapi/schema: add pylint suppressions
From: |
Markus Armbruster |
Subject: |
[PULL 04/25] qapi/schema: add pylint suppressions |
Date: |
Wed, 24 Apr 2024 10:16:49 +0200 |
From: John Snow <jsnow@redhat.com>
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 | 5 -----
scripts/qapi/schema.py | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
index 1342412c3c..c028a1f9f5 100644
--- a/scripts/qapi/pylintrc
+++ b/scripts/qapi/pylintrc
@@ -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
diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py
index 8ba5665bc6..117f0f78f0 100644
--- a/scripts/qapi/schema.py
+++ b/scripts/qapi/schema.py
@@ -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 @@ def c_name(self):
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 @@ def is_implicit(self):
return not self.info
def visit(self, visitor):
+ # pylint: disable=unused-argument
assert self._checked
def describe(self):
@@ -131,6 +135,7 @@ def visit_module(self, name):
pass
def visit_needed(self, entity):
+ # pylint: disable=unused-argument
# Default to visiting everything
return True
--
2.44.0
- [PULL 10/25] qapi/schema: add type narrowing to lookup_type(), (continued)
- [PULL 10/25] qapi/schema: add type narrowing to lookup_type(), Markus Armbruster, 2024/04/24
- [PULL 16/25] qapi/schema: Don't initialize "members" with `None`, Markus Armbruster, 2024/04/24
- [PULL 23/25] qapi/schema: remove unnecessary asserts, Markus Armbruster, 2024/04/24
- [PULL 02/25] qapi/parser: shush up pylint, Markus Armbruster, 2024/04/24
- [PULL 15/25] qapi/schema: add _check_complete flag, Markus Armbruster, 2024/04/24
- [PULL 17/25] qapi/schema: fix typing for QAPISchemaVariants.tag_member, Markus Armbruster, 2024/04/24
- [PULL 03/25] qapi: sort pylint suppressions, Markus Armbruster, 2024/04/24
- [PULL 06/25] qapi/schema: declare type for QAPISchemaObjectTypeMember.type, Markus Armbruster, 2024/04/24
- [PULL 20/25] qapi/parser.py: assert member.info is present in connect_member, Markus Armbruster, 2024/04/24
- [PULL 25/25] qapi: Dumb down QAPISchema.lookup_entity(), Markus Armbruster, 2024/04/24
- [PULL 04/25] qapi/schema: add pylint suppressions,
Markus Armbruster <=
- [PULL 12/25] qapi: Assert built-in types exist, Markus Armbruster, 2024/04/24
- [PULL 07/25] qapi/schema: declare type for QAPISchemaArrayType.element_type, Markus Armbruster, 2024/04/24
- [PULL 05/25] qapi: create QAPISchemaDefinition, Markus Armbruster, 2024/04/24
- [PULL 18/25] qapi/schema: assert inner type of QAPISchemaVariants in check_clash(), Markus Armbruster, 2024/04/24
- [PULL 08/25] qapi/schema: make c_type() and json_type() abstract methods, Markus Armbruster, 2024/04/24
- [PULL 21/25] qapi/schema: add type hints, Markus Armbruster, 2024/04/24
- [PULL 11/25] qapi/schema: assert resolve_type has 'info' and 'what' args on error, Markus Armbruster, 2024/04/24
- [PULL 19/25] qapi/parser: demote QAPIExpression to Dict[str, Any], Markus Armbruster, 2024/04/24
- [PULL 24/25] qapi: Tighten check whether implicit object type already exists, Markus Armbruster, 2024/04/24
- Re: [PULL 00/25] QAPI patches patches for 2024-04-24, Richard Henderson, 2024/04/24