From: Ariel Otilibili <otilibil@eurecom.fr>
To: dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>,
David Marchand <david.marchand@redhat.com>,
Robin Jarry <rjarry@redhat.com>,
stable@dpdk.org, Ariel Otilibili <otilibil@eurecom.fr>
Subject: [PATCH 0/2] buildtools, devtools, dts: clear out Python syntax warnings
Date: Sat, 14 Dec 2024 11:36:34 +0100 [thread overview]
Message-ID: <20241214104257.67419-1-otilibil@eurecom.fr> (raw)
Hello,
This series clears out Python syntax warnings; it follows from a discussion with
Robin Jarry. Being one-liners, they are backported to stable.
Below are all occurences of the re module in the code base. Where it was due,
the string have been escaped.
Thank you,
```
$ git grep -Pn '[^\w_]re\.[a-z]+' | perl -pE 's/:(\d+):\s*/|$1|/' | sed -e '1iFILE_NAME|LINE|PATTERN'
FILE_NAME|LINE|PATTERN
buildtools/get-numa-count.py|14|numa_nodes.sort(key=lambda l: int(re.findall(r'\d+', l)[0]))
buildtools/get-test-suites.py|9|test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
buildtools/get-test-suites.py|12|non_suite_regex = re.compile("REGISTER_TEST_COMMAND\s*\(\s*([a-z0-9_]+)")
buildtools/pmdinfogen.py|74|if re.match(pattern, symbol.name):
buildtools/pmdinfogen.py|103|if re.match(pattern, symbol.name):
devtools/check-meson.py|54|if re.match(r'^ *\t', code):
devtools/update_version_map_abi.py|20|func_line_regex = re.compile(r"\s*"
devtools/update_version_map_abi.py|32|section_begin_regex = re.compile(r"\s*"
devtools/update_version_map_abi.py|41|section_end_regex = re.compile(r"\s*"
devtools/update_version_map_abi.py|183|if not re.match(r"\d{1,2}\.\d{1,2}", parsed.abi_version):
doc/api/generate_doxygen.py|8|pattern = re.compile('^Preprocessing (.*)...$')
doc/api/generate_doxygen.py|17|match = re.match(pattern, line)
dts/framework/parser.py|142|pattern = re.compile(pattern, flags)
dts/framework/parser.py|186|pattern = re.compile(pattern, flags)
dts/framework/remote_session/testpmd_shell.py|1669|iter = re.finditer(r"\*{21}.*?[\r\n]{4}", output + "\r\n", re.S)
dts/framework/remote_session/testpmd_shell.py|1777|iter = re.finditer(r"(^ #*.+#*$[^#]+)^ #*\r$", output, re.MULTILINE)
dts/framework/remote_session/testpmd_shell.py|1898|iter = re.finditer(
dts/framework/testbed_model/posix_session.py|339|match = re.match(pid_regex, out_line)
dts/framework/testbed_model/traffic_generator/scapy.py|236|list_of_packets_base64 = re.findall(
dts/tests/TestSuite_smoke_tests.py|138|devbind_info_for_nic = re.search(
usertools/dpdk-hugepages.py|105|match = re.match(rf"(\d+)([{BINARY_PREFIX}]?)$", arg.upper())
usertools/dpdk-hugepages.py|225|m = re.match(r"node(\d+)", os.path.basename(path))
usertools/dpdk-pmdinfo.py|229|match = re.match(r"^(\d+)\.(\d+).*$", str(version))
usertools/dpdk-pmdinfo.py|273|LDD_LIB_RE = re.compile(
usertools/dpdk-telemetry-exporter.py|322|fullname = re.sub(r"\W", "_", f"dpdk_{e.__name__}_{name}")
usertools/dpdk-telemetry-exporter.py|383|fullname = re.sub(r"\W", ".", f"dpdk.{e.__name__}.{name}")
```
Link: https://inbox.dpdk.org/dev/D6AMQXRSG8E7.33BAORRHRHV9A@redhat.com/
Link: https://inbox.dpdk.org/dev/CAJFAV8yEaWSX2kdiANWuKx7zsvTEnrVoVjnZAOQ_ocdzM8ZTAw@mail.gmail.com/
Ariel Otilibili (2):
buildtools,devtools: clear out Python syntax warnings
dts: clear out Python syntax warnings
buildtools/get-numa-count.py | 2 +-
devtools/check-meson.py | 2 +-
dts/framework/testbed_model/traffic_generator/scapy.py | 2 +-
dts/tests/TestSuite_smoke_tests.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--
2.47.1
next reply other threads:[~2024-12-14 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-14 10:36 Ariel Otilibili [this message]
2024-12-14 10:36 ` [PATCH 1/2] buildtools,devtools: " Ariel Otilibili
2024-12-14 10:36 ` [PATCH 2/2] dts: " Ariel Otilibili
2024-12-17 18:10 ` Patrick Robb
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=20241214104257.67419-1-otilibil@eurecom.fr \
--to=otilibil@eurecom.fr \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=rjarry@redhat.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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;
as well as URLs for NNTP newsgroup(s).