refactor: use iterable unpacking instead of concatenation

This commit is contained in:
Mark Paronyan committed 2026-10-01 19:57:46 +03:00
1 parent 2dc7479d11
commit 06899c92fc
5 files changed
+9 -9

No files matched your search

@@ -524,7 +524,7 @@ def _inject_topology_into_system(
if filtered_count > 0:
logger.debug("Filtered out %d existing SystemMessage(s)", filtered_count)
return [SystemMessage(content=formatted_prompt)] + non_system_messages
return [SystemMessage(content=formatted_prompt), *non_system_messages]
# ============================================================================
@@ -556,7 +556,7 @@ def prepare_context_messages(
else:
formatted_prompt = system_prompt.replace("{{topology_info}}", "(No topology information available)")
return [SystemMessage(content=formatted_prompt)] + state_messages
return [SystemMessage(content=formatted_prompt), *state_messages]
# ============================================================================
@@ -444,7 +444,7 @@ class PacketAnalysisTool(BaseTool):
# Build command: tshark -r <file> <user_args>
import shlex
cmd = ["tshark", "-r", pcap_file] + shlex.split(tshark_args)
cmd = ["tshark", "-r", pcap_file, *shlex.split(tshark_args)]
logger.info(f"Running tshark: {' '.join(cmd)}")