[Piglit] [PATCH 15/44] framework/profile.py: replace dictionary-comprehension with dict()

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Wed Jan 27 16:06:23 PST 2016


From: Dylan Baker <baker.dylan.c at gmail.com>

There wasn't ever a need to use a comprehension here, this is simpler
and easier to read and maintain. It might even be faster.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/profile.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/profile.py b/framework/profile.py
index d461f23..4ab39c0 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -384,8 +384,8 @@ class TestProfile(object):
 
             self.test_list[lgroup] = test_class(
                 args,
-                **{k: v for k, v in itertools.chain(default_args.iteritems(),
-                                                    kwargs.iteritems())})
+                **dict(itertools.chain(six.iteritems(default_args),
+                                       six.iteritems(kwargs))))
 
         yield adder
 
-- 
2.7.0



More information about the Piglit mailing list