[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 29/37] qapi/gen.py: delint with pylint
From: |
John Snow |
Subject: |
[PATCH 29/37] qapi/gen.py: delint with pylint |
Date: |
Tue, 15 Sep 2020 18:40:19 -0400 |
'fp' and 'fd' are self-evident in context, add them to the list of OK
names.
_top and _bottom also need to stay class methods because some users
override the method and need to use `self`. Tell pylint to shush.
Signed-off-by: John Snow <jsnow@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 bd67f6b069..0a72aecdd0 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -46,9 +46,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 c50a6656b7..3aebb0d228 100644
--- a/scripts/qapi/pylintrc
+++ b/scripts/qapi/pylintrc
@@ -5,7 +5,6 @@
ignore-patterns=doc.py,
error.py,
expr.py,
- gen.py,
parser.py,
schema.py,
types.py,
@@ -46,7 +45,9 @@ good-names=i,
k,
ex,
Run,
- _
+ _,
+ fp, # fp = open(...)
+ fd, # fd = os.open(...)
[VARIABLES]
--
2.26.2
- [PATCH 24/37] qapi/gen.py: Fix edge-case of _is_user_module, (continued)
- [PATCH 24/37] qapi/gen.py: Fix edge-case of _is_user_module, John Snow, 2020/09/15
- [PATCH 21/37] qapi/commands.py: enable checking with mypy, John Snow, 2020/09/15
- [PATCH 16/37] qapi: establish mypy type-checking baseline, John Snow, 2020/09/15
- [PATCH 18/37] qapi/events.py: Move comments into docstrings, John Snow, 2020/09/15
- [PATCH 22/37] qapi/source.py: add notational type hints, John Snow, 2020/09/15
- [PATCH 19/37] qapi/commands.py: Don't re-bind to variable of different type, John Snow, 2020/09/15
- [PATCH 17/37] qapi/events.py: add notational type hints, John Snow, 2020/09/15
- [PATCH 20/37] qapi/commands.py: add notational type hints, John Snow, 2020/09/15
- [PATCH 23/37] qapi/source.py: delint with pylint, John Snow, 2020/09/15
- [PATCH 28/37] qapi/gen.py: update write() to be more idiomatic, John Snow, 2020/09/15
- [PATCH 29/37] qapi/gen.py: delint with pylint,
John Snow <=
- [PATCH 27/37] qapi/gen.py: Remove unused parameter, John Snow, 2020/09/15
- [PATCH 26/37] qapi/gen.py: Enable checking with mypy, John Snow, 2020/09/15
- [PATCH 30/37] qapi/introspect.py: Add a typed 'extra' structure, John Snow, 2020/09/15
- [PATCH 25/37] qapi/gen.py: add notational type hints, John Snow, 2020/09/15
- [PATCH 34/37] qapi/types.py: add notational type hints, John Snow, 2020/09/15
- [PATCH 36/37] qapi/visit.py: remove unused parameters from gen_visit_object, John Snow, 2020/09/15
- [PATCH 37/37] qapi/visit.py: add notational type hints, John Snow, 2020/09/15
- [PATCH 31/37] qapi/introspect.py: add _gen_features helper, John Snow, 2020/09/15
- [PATCH 32/37] qapi/introspect.py: create a typed 'Node' data structure, John Snow, 2020/09/15
- [PATCH 35/37] qapi/types.py: remove one-letter variables, John Snow, 2020/09/15