[Piglit] [PATCH] piglit-print-commands.py: PEP8 fixes.

Dylan Baker baker.dylan.c at gmail.com
Sat Jan 10 13:46:10 PST 2015


On Friday, January 09, 2015 07:03:05 PM Vinson Lee wrote:
> piglit-print-commands.py:41:32: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:41:34: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:42:31: E221 multiple spaces before operator
> piglit-print-commands.py:42:31: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:42:34: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:43:32: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:43:34: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:44:29: E221 multiple spaces before operator
> piglit-print-commands.py:44:29: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:44:34: E251 unexpected spaces around keyword / parameter equals
> piglit-print-commands.py:44:80: E501 line too long (89 > 79 characters)
> piglit-print-commands.py:57:24: E128 continuation line under-indented for visual indent
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  piglit-print-commands.py | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/piglit-print-commands.py b/piglit-print-commands.py
> index af24902..be7e0ec 100755
> --- a/piglit-print-commands.py
> +++ b/piglit-print-commands.py
> @@ -38,10 +38,11 @@ def main():
>      core.get_config()
>      parser = argparse.ArgumentParser(sys.argv)
>      parser.add_argument("-t", "--include-tests",
> -                        default = [],
> -                        action  = "append",
> -                        metavar = "<regex>",
> -                        help    = "Run only matching tests (can be used more than once)")
> +                        default=[],
> +                        action="append",
> +                        metavar="<regex>",
> +                        help="Run only matching tests (can be used more than "
> +                             "once)")

I'd prefer if we split this line at the paren, I think that makes it
easier to read.

With that change,
Reviewed-by: Dylan Baker <dylanx.c.baker at intel.com>

>      parser.add_argument("-x", "--exclude-tests",
>                          default=[],
>                          action="append",
> @@ -54,7 +55,7 @@ def main():
>      args = parser.parse_args()
>  
>      opts = core.Options(exclude_filter=args.exclude_tests,
> -                       include_filter=args.include_tests)
> +                        include_filter=args.include_tests)
>  
>      # Change to the piglit's path
>      piglit_dir = path.dirname(path.realpath(sys.argv[0]))
> -- 
> 2.1.0
> 
> _______________________________________________
> 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: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150110/33ae6cd4/attachment.sig>


More information about the Piglit mailing list