Re: [PATCH] scripts/show_delta: reformat code

From: Hu Haowen
Date: Fri Dec 01 2023 - 00:04:54 EST



On 2023/12/1 01:13, Miguel Ojeda wrote:
On Thu, Nov 30, 2023 at 3:49 PM Hu Haowen <2023002089@xxxxxxxxxxxxxxxx> wrote:
- if string.find(rest, base_str)==1:
+ if string.find(rest, base_str) == 1:
If this is changed, shouldn't be others like:

if arg=="-b":
elif arg=="-h":
be changed too?


Sorry, ignored by accident. I'll make up within the next patch version.


In other words, it seems this was done manually. Should we instead
introduce/use something like Black or Ruff if we are going to do this
sort of changes?


I'm sorry but I'm not familiar with these two things. Are Black and Ruff
some kind of tools which help identify these code format issues? If so
it is better to introduce them to assist to accomplish the similar
series of work instead of only completing it manually with avoiding
omitted parts simultaneously.

Thanks,
Hu Haowen


Thanks!

Cheers,
Miguel