Re: [PATCH v2] scripts/show_delta: reformat code

From: Nicolas Schier
Date: Fri Dec 01 2023 - 01:55:24 EST


On Fri, Dec 01, 2023 at 01:35:40PM +0800, Hu Haowen wrote:
> Correct some lines in irregular coding style to make them look more
> harmonious and fit the common coding regulations in Python.
>
> Signed-off-by: Hu Haowen <2023002089@xxxxxxxxxxxxxxxx>
> ---
> scripts/show_delta | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/scripts/show_delta b/scripts/show_delta
> index 291ad65e3089..33446adce74b 100755
> --- a/scripts/show_delta
> +++ b/scripts/show_delta
> @@ -13,7 +13,7 @@ import sys
> import string
>
> def usage():
> - print ("""usage: show_delta [<options>] <filename>
> + print("""usage: show_delta [<options>] <filename>

Hi,

thanks for your patch. What Miguel already noticed for v1 is valid for
v2, too: there are still inconsistencies in the coding style, e.g.
`print (...)` and `print(...)`.

To simplify a consistent coding style for future work on the script,
using an external tool for reformatting (and mentioning it in the commit
message) would be helpful. Miguel suggested Black or Ruff, I think this
is a good idea.

Kind regards,
Nicolas

Attachment: signature.asc
Description: PGP signature