diff mbox series

[02/14] qapi/doc.py: avoid unnecessary keyword arguments

Message ID 20200922211802.4083666-3-jsnow@redhat.com
State New
Headers show
Series qapi: static typing conversion, pt3 | expand

Commit Message

John Snow Sept. 22, 2020, 9:17 p.m. UTC
Keyword Callables are hard to type in Python 3.6, avoid them if there's
no urgent need to use them.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 scripts/qapi/doc.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Eduardo Habkost Sept. 23, 2020, 8:46 p.m. UTC | #1
On Tue, Sep 22, 2020 at 05:17:50PM -0400, John Snow wrote:
> Keyword Callables are hard to type in Python 3.6, avoid them if there's
> no urgent need to use them.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
diff mbox series

Patch

diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py
index 4743beb89a..66333629d6 100644
--- a/scripts/qapi/doc.py
+++ b/scripts/qapi/doc.py
@@ -164,7 +164,8 @@  def texi_members(doc, what, base=None, variants=None,
             desc = 'One of ' + members_text + '\n'
         else:
             desc = 'Not documented\n'
-        items += member_func(section.member, desc, suffix='')
+
+        items += member_func(section.member, desc, '')
     if base:
         items += '@item The members of @code{%s}\n' % base.doc_type()
     if variants:
@@ -174,7 +175,7 @@  def texi_members(doc, what, base=None, variants=None,
             if v.type.is_implicit():
                 assert not v.type.base and not v.type.variants
                 for m in v.type.local_members:
-                    items += member_func(m, desc='', suffix=when)
+                    items += member_func(m, '', when)
             else:
                 items += '@item The members of @code{%s}%s\n' % (
                     v.type.doc_type(), when)