From: Nicolas Schier <n.schier@avm.de>
To: Hu Haowen <2023002089@link.tyut.edu.cn>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
gregkh@linuxfoundation.org, akpm@linux-foundation.org,
masahiroy@kernel.org, ndesaulniers@google.com, ojeda@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/show_delta: reformat code
Date: Fri, 1 Dec 2023 13:10:34 +0100 [thread overview]
Message-ID: <ZWnNOswNOP_1_EcH@buildd.core.avm.de> (raw)
In-Reply-To: <9075f00e-f914-4739-aae2-ba4ccfd6236b@link.tyut.edu.cn>
On Fri, Dec 01, 2023 at 12:56:14PM +0800, Hu Haowen wrote:
>
> On 2023/12/1 01:13, Miguel Ojeda wrote:
> > On Thu, Nov 30, 2023 at 3:49 PM Hu Haowen <2023002089@link.tyut.edu.cn> 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.
yes, both are Python code formatters:
Black:
Documentation: https://black.readthedocs.io/en/stable/
Repology: https://repology.org/project/black/
Ruff:
Documentation: https://docs.astral.sh/ruff/formatter/
Repology: https://repology.org/project/ruff-python-linter/
Kind regards,
Nicolas
prev parent reply other threads:[~2023-12-01 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 14:38 [PATCH] scripts/show_delta: reformat code Hu Haowen
2023-11-30 17:13 ` Miguel Ojeda
2023-12-01 4:56 ` Hu Haowen
2023-12-01 12:10 ` Nicolas Schier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZWnNOswNOP_1_EcH@buildd.core.avm.de \
--to=n.schier@avm.de \
--cc=2023002089@link.tyut.edu.cn \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox