diff mbox series

[14/16] qapi/expr.py: Use tuples instead of lists for static data

Message ID 20200922211313.4082880-15-jsnow@redhat.com
State New
Headers show
Series qapi: static typing conversion, pt2 | expand

Commit Message

John Snow Sept. 22, 2020, 9:13 p.m. UTC
It is -- maybe -- possibly -- three nanoseconds faster.

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

Comments

Eduardo Habkost Sept. 23, 2020, 8:18 p.m. UTC | #1
On Tue, Sep 22, 2020 at 05:13:11PM -0400, John Snow wrote:
> It is -- maybe -- possibly -- three nanoseconds faster.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Cleber Rosa Sept. 25, 2020, 1:03 a.m. UTC | #2
On Tue, Sep 22, 2020 at 05:13:11PM -0400, John Snow wrote:
> It is -- maybe -- possibly -- three nanoseconds faster.
>

Kevin O'Leary would clearly say here: "stop the madness!" :)

> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Cleber Rosa <crosa@redhat.com>
John Snow Sept. 25, 2020, 1:12 a.m. UTC | #3
On 9/24/20 9:03 PM, Cleber Rosa wrote:
> On Tue, Sep 22, 2020 at 05:13:11PM -0400, John Snow wrote:

>> It is -- maybe -- possibly -- three nanoseconds faster.

>>

> 

> Kevin O'Leary would clearly say here: "stop the madness!" :)

> 

>> Signed-off-by: John Snow <jsnow@redhat.com>

> 

> Reviewed-by: Cleber Rosa <crosa@redhat.com>

> 


I can explain!

When I sat down to write this series, I just "cleaned" in general 
without regard to what was strictly necessary and what wasn't.

Once I had to split them out, brick-by-brick, some things looked much 
more frivolous than others, but I had already written and tested them, so...

Well. There are definitely a few unimportant patches here.

--js
diff mbox series

Patch

diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index 2a1f37ca88..69ee9e3f18 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -171,11 +171,11 @@  def check_flags(expr: Expression, info: QAPISourceInfo) -> None:
     :param expr: Expression to validate.
     :param info: QAPI source file information.
     """
-    for key in ['gen', 'success-response']:
+    for key in ('gen', 'success-response'):
         if key in expr and expr[key] is not False:
             raise QAPISemError(
                 info, "flag '%s' may only use false value" % key)
-    for key in ['boxed', 'allow-oob', 'allow-preconfig']:
+    for key in ('boxed', 'allow-oob', 'allow-preconfig'):
         if key in expr and expr[key] is not True:
             raise QAPISemError(
                 info, "flag '%s' may only use true value" % key)