[Piglit] [PATCH] gen_dispatch.py: PEP 8 fixes

Ian Romanick idr at freedesktop.org
Mon Jan 26 13:45:35 PST 2015


On 01/22/2015 09:58 PM, Vinson Lee wrote:
> gen_dispatch.py:81:14: E241 multiple spaces after ':'
> gen_dispatch.py:81:27: E241 multiple spaces after ','
> gen_dispatch.py:145:5: E303 too many blank lines (2)
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/util/gen_dispatch.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py
> index 233a6fb..2074c5a 100644
> --- a/tests/util/gen_dispatch.py
> +++ b/tests/util/gen_dispatch.py
> @@ -78,7 +78,7 @@ class DispatchCode(object):
>                       ('name', 'base_version_int', 'c_piglit_token'))
>  
>      APIS = {
> -        'gl':    Api('gl',    10, 'PIGLIT_DISPATCH_GL'),
> +        'gl': Api('gl', 10, 'PIGLIT_DISPATCH_GL'),
>          'gles1': Api('gles1', 11, 'PIGLIT_DISPATCH_ES1'),
>          'gles2': Api('gles2', 20, 'PIGLIT_DISPATCH_ES2'),
>      }

This is a case where, frankly, PEP is just wrong, and we should ignore
it.  The code was readable, but now it is not.

> @@ -141,7 +141,6 @@ class EnumCode(object):
>              gl_registry=gl_registry,
>              sorted_unique_enums_in_default_namespace=enums)
>  
> -
>      @classmethod
>      def get_unique_enums_in_default_namespace(cls, gl_registry):
>          def cmp_enums(x, y):
> 



More information about the Piglit mailing list