mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi/parser: fix unused check_args_section arguments
Pylint informs us we're not using these arguments. Oops, it's
right. Correct the error message and remove the remaining unused
parameter.
Fix test output now that the error message is improved.
Fixes: e151941d1b
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210930205716.1148693-4-jsnow@redhat.com>
[Commit message formatting tweaked]
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
2adb988ed4
commit
012336a152
2 changed files with 10 additions and 8 deletions
|
@ -753,16 +753,18 @@ class QAPIDoc:
|
|||
|
||||
def check(self):
|
||||
|
||||
def check_args_section(args, info, what):
|
||||
def check_args_section(args, what):
|
||||
bogus = [name for name, section in args.items()
|
||||
if not section.member]
|
||||
if bogus:
|
||||
raise QAPISemError(
|
||||
self.info,
|
||||
"documented member%s '%s' %s not exist"
|
||||
% ("s" if len(bogus) > 1 else "",
|
||||
"', '".join(bogus),
|
||||
"do" if len(bogus) > 1 else "does"))
|
||||
"documented %s%s '%s' %s not exist" % (
|
||||
what,
|
||||
"s" if len(bogus) > 1 else "",
|
||||
"', '".join(bogus),
|
||||
"do" if len(bogus) > 1 else "does"
|
||||
))
|
||||
|
||||
check_args_section(self.args, self.info, 'members')
|
||||
check_args_section(self.features, self.info, 'features')
|
||||
check_args_section(self.args, 'member')
|
||||
check_args_section(self.features, 'feature')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue