mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
cc6263c44b
commit
9abddb5be4
|
@ -51,9 +51,11 @@ class QAPIGen:
|
||||||
return self._top() + self._preamble + self._body + self._bottom()
|
return self._top() + self._preamble + self._body + self._bottom()
|
||||||
|
|
||||||
def _top(self) -> str:
|
def _top(self) -> str:
|
||||||
|
# pylint: disable=no-self-use
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def _bottom(self) -> str:
|
def _bottom(self) -> str:
|
||||||
|
# pylint: disable=no-self-use
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def write(self, output_dir: str) -> None:
|
def write(self, output_dir: str) -> None:
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
# The regex matches against base names, not paths.
|
# The regex matches against base names, not paths.
|
||||||
ignore-patterns=error.py,
|
ignore-patterns=error.py,
|
||||||
expr.py,
|
expr.py,
|
||||||
gen.py,
|
|
||||||
parser.py,
|
parser.py,
|
||||||
schema.py,
|
schema.py,
|
||||||
types.py,
|
types.py,
|
||||||
|
@ -45,7 +44,9 @@ good-names=i,
|
||||||
k,
|
k,
|
||||||
ex,
|
ex,
|
||||||
Run,
|
Run,
|
||||||
_
|
_,
|
||||||
|
fp, # fp = open(...)
|
||||||
|
fd, # fd = os.open(...)
|
||||||
|
|
||||||
[VARIABLES]
|
[VARIABLES]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue