mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
refactor: use iterable unpacking instead of concatenation
This commit is contained in:
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)}")
|
||||
|
||||
|
||||
Reference in new issue
Block a user