DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] buildtools, devtools, dts: clear out Python syntax warnings
@ 2024-12-14 10:36 Ariel Otilibili
  2024-12-14 10:36 ` [PATCH 1/2] buildtools,devtools: " Ariel Otilibili
  2024-12-14 10:36 ` [PATCH 2/2] dts: " Ariel Otilibili
  0 siblings, 2 replies; 4+ messages in thread
From: Ariel Otilibili @ 2024-12-14 10:36 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, David Marchand, Robin Jarry, stable, Ariel Otilibili

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-17 18:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-14 10:36 [PATCH 0/2] buildtools, devtools, dts: clear out Python syntax warnings Ariel Otilibili
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

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).