[Piglit] [PATCH] profile.py: Fix PEP 8 issues.

Dylan Baker baker.dylan.c at gmail.com
Mon Mar 16 14:31:29 PDT 2015


Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>

On Sat, Mar 14, 2015 at 01:11:20AM -0700, Vinson Lee wrote:
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  framework/profile.py | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/framework/profile.py b/framework/profile.py
> index 3a90f50..603e872 100644
> --- a/framework/profile.py
> +++ b/framework/profile.py
> @@ -68,11 +68,11 @@ class TestDict(dict):  # pylint: disable=too-few-public-methods
>  
>          """
>          assert isinstance(key, basestring), \
> -               "Keys must be strings, but was {}".format(type(key))
> +            "Keys must be strings, but was {}".format(type(key))
>          # None is required to make empty assignment work:
>          # foo = Tree['a']
>          assert isinstance(value, (Test, types.NoneType)), \
> -               "Values must be either a Test, but was {}".format(type(value))
> +            "Values must be either a Test, but was {}".format(type(value))
>  
>          super(TestDict, self).__setitem__(key.lower(), value)
>  
> @@ -144,11 +144,13 @@ class TestProfile(object):
>          # The extra argument is needed to match check_all's API
>          def test_matches(path, test):
>              """Filter for user-specified restrictions"""
> -            return ((not opts.filter or matches_any_regexp(path, opts.filter))
> -                    and not path in opts.exclude_tests and
> +            return ((not opts.filter or
> +                     matches_any_regexp(path, opts.filter)) and
> +                    path not in opts.exclude_tests and
>                      not matches_any_regexp(path, opts.exclude_filter))
>  
>          filters = self.filters + [test_matches]
> +
>          def check_all(item):
>              """ Checks group and test name against all filters """
>              path, test = item
> @@ -343,8 +345,8 @@ class TestProfile(object):
>  
>              self.test_list[lgroup] = test_class(
>                  args,
> -                **{k:v for k, v in itertools.chain(default_args.iteritems(),
> -                                                   kwargs.iteritems())})
> +                **{k: v for k, v in itertools.chain(default_args.iteritems(),
> +                                                    kwargs.iteritems())})
>  
>          yield adder
>  
> -- 
> 2.3.2
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150316/3043db1f/attachment.sig>


More information about the Piglit mailing list