Re: [PATCH v1] kselftest/devices/probe: fixed SintaxWarning for Python 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 02, 2024 at 06:13:37PM +0200, Alessandro Zanni wrote:
> Inserted raw strings because Python3 interpretes string literals as Unicode strings,
> so '\d' is considered an invalid escaped sequence but this is not the case.
> This fix avoids the "SyntaxWarning: invalid escape sequence '\d'" warning
> for Python versions greater than 3.6.
> 
> Signed-off-by: Alessandro Zanni <alessandro.zanni87@xxxxxxxxx>

Hi,

thank you for the patch.

As described in 
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
you should

  Describe your changes in imperative mood, e.g. “make xyzzy do frotz” instead
  of “[This patch] makes xyzzy do frotz” or “[I] changed xyzzy to do frotz”,

So a better commit summary would be this:

kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python 3

And similarly, in the commit message: "Insert raw strings...".

Also, this is fixing an issue in a previous commit, so you should add a tag for
that (before your Signed-off-by):

Fixes: dacf1d7a78bf ("kselftest: Add test to verify probe of devices from discoverable buses")

Other than that this looks good to me, so after making those changes in a v2 you
can add my

Reviewed-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>

> ---
> 
> Notes:
>     v1: inserted raw strings to avoid SyntaxWarning in Python3

You don't need to add a changelog for v1, only starting with v2.

Thanks,
Nícolas




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux