Re: [PATCH v5 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-07 Thread John Snow
On 10/7/20 8:02 AM, Markus Armbruster wrote: John Snow writes: The edge case is that if the name is '', this expression returns a string instead of a bool, which violates our declared type. The edge case is impossible, as discussed in review of v2. I figure the type checker can't see that,

Re: [PATCH v5 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-07 Thread Markus Armbruster
John Snow writes: > The edge case is that if the name is '', this expression returns a > string instead of a bool, which violates our declared type. The edge case is impossible, as discussed in review of v2. I figure the type checker can't see that, so we need to help it some. Can we mention t

Re: [PATCH v5 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-06 Thread Philippe Mathieu-Daudé
On 10/5/20 9:51 PM, John Snow wrote: > The edge case is that if the name is '', this expression returns a > string instead of a bool, which violates our declared type. > > Signed-off-by: John Snow > Reviewed-by: Cleber Rosa > Reviewed-by: Eduardo Habkost > --- > scripts/qapi/gen.py | 2 +- > 1

[PATCH v5 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-05 Thread John Snow
The edge case is that if the name is '', this expression returns a string instead of a bool, which violates our declared type. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Reviewed-by: Eduardo Habkost --- scripts/qapi/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi