aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2020-10-09 12:15:53 -0400
committerMarkus Armbruster <armbru@redhat.com>2020-10-10 11:37:49 +0200
commit9abddb5be44245e8529a8c132a16176fc63d0df6 (patch)
tree47ddf4322d5b330dfc6edbc2d06940fa2ccfc954
parentcc6263c44b3ad70a8cb884518e78e70c17f180d0 (diff)
downloadqemu-9abddb5be44245e8529a8c132a16176fc63d0df6.zip
qemu-9abddb5be44245e8529a8c132a16176fc63d0df6.tar.gz
qemu-9abddb5be44245e8529a8c132a16176fc63d0df6.tar.bz2
qapi/gen.py: delint with pylint
'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> Message-Id: <20201009161558.107041-32-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--scripts/qapi/gen.py2
-rw-r--r--scripts/qapi/pylintrc5
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index 670c21e..b40f18e 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -51,9 +51,11 @@ class QAPIGen:
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 d840b15..8badcb1 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]