[Piglit] [PATCH 19/26] gen_uniform_initializer_tests.py: PEP8 compliance

Chad Versace chad.versace at linux.intel.com
Mon Jul 22 14:32:15 PDT 2013


On 07/10/2013 03:19 PM, Dylan Baker wrote:
> ---
>   generated_tests/gen_uniform_initializer_tests.py | 61 ++++++++++++++----------
>   1 file changed, 35 insertions(+), 26 deletions(-)
>
> diff --git a/generated_tests/gen_uniform_initializer_tests.py b/generated_tests/gen_uniform_initializer_tests.py
> index dbb798d..f4bddcc 100644
> --- a/generated_tests/gen_uniform_initializer_tests.py
> +++ b/generated_tests/gen_uniform_initializer_tests.py
> @@ -54,16 +54,21 @@ def get_value(type, idx):
>   def generate_tests(type_list, base_name, major, minor):
>       for target in ("vs", "fs"):
>           for t in all_templates:
> -            template_file_name = "uniform-initializer-templates/{0}-initializer{1}.template".format(target, t)
> +            template_file_name = (
> +                "uniform-initializer-templates/{0}-initializer{1}.template"
> +                .format(target, t))


The original was understandable. The new formatting is significantly more difficult to read.


           test_file_name = dirname = os.path.join('spec',
> -                                                    'glsl-{0}.{1}'.format(major, minor),
> +                                                    'glsl-{0}.{1}'
> +                                                    .format(major, minor),
>                                                       'execution',
>                                                       'uniform-initializer',
> -                                                    '{0}-{1}{2}.shader_test'.format(target, base_name, t))
> +                                                    '{0}-{1}{2}.shader_test'
> +                                                    .format(target, base_name,
> +                                                            t))


The original was understandable. The new formatting is significantly more difficult to read.


>
>   def generate_array_tests(type_list, base_name, major, minor):
>       for target in ("vs", "fs"):
> -        template_file_name = "uniform-initializer-templates/{0}-initializer.template".format(target)
> +        template_file_name = \
> +            "uniform-initializer-templates/{0}-initializer.template".format(
> +                target)


The original was understandable. The new formatting is significantly more difficult to read.


>
>           test_file_name = dirname = os.path.join('spec',
> -                                                'glsl-{0}.{1}'.format(major, minor),
> +                                                'glsl-{0}.{1}'.format(major,
> +                                                                      minor),
>                                                   'execution',
>                                                   'uniform-initializer',
> -                                                '{0}-{1}-array.shader_test'.format(target, base_name))
> +                                                '{0}-{1}-array.shader_test'
> +                                                .format(target, base_name))


The original was understandable. The new formatting is significantly more difficult to read.


If I didn't complain about it, then I thought it looked good.




More information about the Piglit mailing list