[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 04/23] qapi/schema: add pylint suppressions
From: |
John Snow |
Subject: |
[PATCH v4 04/23] qapi/schema: add pylint suppressions |
Date: |
Wed, 13 Mar 2024 00:41:08 -0400 |
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>
---
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 1342412c3cf..c028a1f9f51 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 8ba5665bc68..117f0f78f0c 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
- [PATCH v4 00/23] qapi: statically type schema.py, John Snow, 2024/03/13
- [PATCH v4 03/23] qapi: sort pylint suppressions, John Snow, 2024/03/13
- [PATCH v4 01/23] qapi/parser: fix typo - self.returns.info => self.errors.info, John Snow, 2024/03/13
- [PATCH v4 09/23] qapi/schema: adjust type narrowing for mypy's benefit, John Snow, 2024/03/13
- [PATCH v4 04/23] qapi/schema: add pylint suppressions,
John Snow <=
- [PATCH v4 13/23] qapi/schema: fix QAPISchemaArrayType.check's call to resolve_type, John Snow, 2024/03/13
- [PATCH v4 02/23] qapi/parser: shush up pylint, John Snow, 2024/03/13
- [PATCH v4 12/23] qapi: use schema.resolve_type instead of schema.lookup_type, John Snow, 2024/03/13
- [PATCH v4 18/23] qapi/schema: assert inner type of QAPISchemaVariants in check_clash(), John Snow, 2024/03/13
- [PATCH v4 14/23] qapi/schema: assert info is present when necessary, John Snow, 2024/03/13
- [PATCH v4 07/23] qapi/schema: declare type for QAPISchemaArrayType.element_type, John Snow, 2024/03/13
- [PATCH v4 05/23] qapi: create QAPISchemaDefinition, John Snow, 2024/03/13