From: Lukas Sismis <sismis@dyna-nic.com>
To: dev@dpdk.org
Cc: Lukas Sismis <sismis@dyna-nic.com>
Subject: [PATCH v2 6/7] dts: fix invalid f-string syntax in testpmd API
Date: Tue, 6 Jan 2026 16:38:36 +0100 [thread overview]
Message-ID: <20260106153838.398033-7-sismis@dyna-nic.com> (raw)
In-Reply-To: <20260106153838.398033-1-sismis@dyna-nic.com>
Fix Python syntax errors in f-strings that used nested quotes
incorrectly. The pattern f'{foo['bar']}' is invalid Python 3.11
syntax and breaks Sphinx autodoc during documentation builds.
Use f"{foo['bar']}" with outer double quotes instead.
Signed-off-by: Lukas Sismis <sismis@dyna-nic.com>
---
dts/api/testpmd/__init__.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dts/api/testpmd/__init__.py b/dts/api/testpmd/__init__.py
index a20dedc25a..703cae487e 100644
--- a/dts/api/testpmd/__init__.py
+++ b/dts/api/testpmd/__init__.py
@@ -227,7 +227,7 @@ def start_tx_first(self, burst_num: int, verify: bool = True) -> None:
InteractiveCommandExecutionError: If `verify` is :data:`True` and forwarding fails to
start or ports fail to come up.
"""
- self.send_command(f"start tx_first {burst_num if burst_num is not None else ""}")
+ self.send_command(f"start tx_first {burst_num if burst_num is not None else ''}")
if verify:
# If forwarding was already started, sending "start" again should tell us
start_cmd_output = self.send_command("start")
@@ -898,11 +898,11 @@ def set_qinq_strip(self, port: int, enable: bool, verify: bool = True) -> None:
vlan_settings = self.show_port_info(port_id=port).vlan_offload
if enable ^ (vlan_settings is not None and VLANOffloadFlag.QINQ_STRIP in vlan_settings):
self._logger.debug(
- f"Failed to {"enable" if enable else "disable"}"
+ f"Failed to {'enable' if enable else 'disable'}"
f"QinQ strip on port {port}: \n{qinq_cmd_output}"
)
raise InteractiveCommandExecutionError(
- f"Failed to {"enable" if enable else "disable"} QinQ strip on port {port}"
+ f"Failed to {'enable' if enable else 'disable'} QinQ strip on port {port}"
)
def set_mac_address(self, port: int, mac_address: str, verify: bool = True) -> None:
@@ -1535,7 +1535,7 @@ def set_port_mbuf_fast_free(
InteractiveCommandExecutionError: If mbuf_fast_free could not be set successfully.
"""
mbuf_output = self.send_command(
- f"port config {port_id} tx_offload mbuf_fast_free {"on" if on else "off"}"
+ f"port config {port_id} tx_offload mbuf_fast_free {'on' if on else 'off'}"
)
if verify and "Error" in mbuf_output:
--
2.43.7
next prev parent reply other threads:[~2026-01-06 15:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 15:38 [RFC PATCH v2 0/7] flow_parser: add shared parser library Lukas Sismis
2026-01-06 15:38 ` [PATCH v2 1/7] " Lukas Sismis
2026-01-06 15:38 ` [PATCH v2 2/7] app/testpmd: integrate shared flow " Lukas Sismis
2026-01-06 15:38 ` [PATCH v2 3/7] examples/flow_parsing: add flow parser demo Lukas Sismis
2026-01-06 15:38 ` [PATCH v2 4/7] test: add flow parser unit tests Lukas Sismis
2026-01-06 18:04 ` Stephen Hemminger
2026-01-06 18:07 ` Stephen Hemminger
2026-01-06 15:38 ` [PATCH v2 5/7] doc: add flow parser library maintainers Lukas Sismis
2026-01-06 15:38 ` Lukas Sismis [this message]
2026-01-06 15:38 ` [PATCH v2 7/7] cmdline: include stddef.h before defining offsetof Lukas Sismis
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=20260106153838.398033-7-sismis@dyna-nic.com \
--to=sismis@dyna-nic.com \
--cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).