aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-09-30 16:57:06 -0400
committerMarkus Armbruster <armbru@redhat.com>2021-10-02 07:33:41 +0200
commit012336a152641b264a65176a388a7fb0118e1781 (patch)
tree77cb6585c94d64ab306c142f59ca39f565976be6 /scripts/qapi/parser.py
parent2adb988ed4ca31813d237c475a6a327ef16c5432 (diff)
downloadqemu-012336a152641b264a65176a388a7fb0118e1781.zip
qemu-012336a152641b264a65176a388a7fb0118e1781.tar.gz
qemu-012336a152641b264a65176a388a7fb0118e1781.tar.bz2
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>
Diffstat (limited to 'scripts/qapi/parser.py')
-rw-r--r--scripts/qapi/parser.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index f03ba2c..bfd2dbf 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -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"))
-
- check_args_section(self.args, self.info, 'members')
- check_args_section(self.features, self.info, 'features')
+ "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, 'member')
+ check_args_section(self.features, 'feature')