[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 31/36] qapi/gen.py: delint with pylint
From: |
John Snow |
Subject: |
[PATCH v5 31/36] qapi/gen.py: delint with pylint |
Date: |
Mon, 5 Oct 2020 15:51:53 -0400 |
'fp' and 'fd' are self-evident in context, add them to the list of OK
names.
_top and _bottom also need to stay standard methods because some users
override the method and need to use `self`. Tell pylint to shush.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
---
scripts/qapi/gen.py | 2 ++
scripts/qapi/pylintrc | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index 579ee283297..29bdd140587 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -53,9 +53,11 @@ def get_content(self) -> str:
return self._top() + self._preamble + self._body + self._bottom()
def _top(self) -> str:
+ # pylint: disable=no-self-use
return ''
def _bottom(self) -> str:
+ # pylint: disable=no-self-use
return ''
def write(self, output_dir: str) -> None:
diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
index d840b150313..8badcb11cda 100644
--- a/scripts/qapi/pylintrc
+++ b/scripts/qapi/pylintrc
@@ -4,7 +4,6 @@
# The regex matches against base names, not paths.
ignore-patterns=error.py,
expr.py,
- gen.py,
parser.py,
schema.py,
types.py,
@@ -45,7 +44,9 @@ good-names=i,
k,
ex,
Run,
- _
+ _,
+ fp, # fp = open(...)
+ fd, # fd = os.open(...)
[VARIABLES]
--
2.26.2
- Re: [PATCH v5 24/36] qapi/source.py: add type hint annotations, (continued)
[PATCH v5 27/36] qapi/gen.py: add type hint annotations, John Snow, 2020/10/05
[PATCH v5 31/36] qapi/gen.py: delint with pylint,
John Snow <=
[PATCH v5 29/36] qapi/gen.py: Remove unused parameter, John Snow, 2020/10/05
[PATCH v5 30/36] qapi/gen.py: update write() to be more idiomatic, John Snow, 2020/10/05
[PATCH v5 32/36] qapi/types.py: add type hint annotations, John Snow, 2020/10/05
[PATCH v5 34/36] qapi/visit.py: assert tag_member contains a QAPISchemaEnumType, John Snow, 2020/10/05