On Tue, Sep 22, 2020 at 05:00:36PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow <js...@redhat.com> > --- > scripts/qapi/common.py | 27 ++++++++++++++++----------- > 1 file changed, 16 insertions(+), 11 deletions(-) > > diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py > index 682e74fe65..0ce4a107e6 100644 > --- a/scripts/qapi/common.py > +++ b/scripts/qapi/common.py > @@ -12,6 +12,7 @@ [...] > @@ -176,7 +179,7 @@ def gen_if(ifcond): > return ret > > > -def gen_endif(ifcond): > +def gen_endif(ifcond: Sequence[str]) -> str:
Does this need to require a Sequence? It looks like it could be Iterable. I don't think this should block the patch, though, so: Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> > ret = '' > for ifc in reversed(ifcond): > ret += mcgen(''' > @@ -185,7 +188,9 @@ def gen_endif(ifcond): > return ret > > > -def build_params(arg_type, boxed, extra=None): > +def build_params(arg_type, > + boxed: bool, > + extra: Optional[str] = None) -> str: > ret = '' > sep = '' > if boxed: > -- > 2.26.2 > -- Eduardo