From 05fb62574c16e69ba54474b5c9c9b8c685184d75 Mon Sep 17 00:00:00 2001 From: hobostay <110hqc@gmail.com> Date: Fri, 6 Feb 2026 19:32:30 +0800 Subject: [PATCH] docs: improve docstring and comments in CLI - Fix grammar and capitalization in run() function docstring - Correct parameter name from 'tasks' to 'task' - Improve parameter descriptions for clarity - Change informal comment to professional documentation This improves code readability and maintains consistency with Google Python Style Guide. Co-Authored-By: Claude Sonnet 4.5 --- trae_agent/cli.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/trae_agent/cli.py b/trae_agent/cli.py index 3c20b820..a8a01708 100644 --- a/trae_agent/cli.py +++ b/trae_agent/cli.py @@ -212,14 +212,15 @@ def run( docker_keep: bool = True, ): """ - Run is the main function of trae. it runs a task using Trae Agent. + Run is the main function of trae. It runs a task using Trae Agent. + Args: - tasks: the task that you want your agent to solve. This is required to be in the input - model: the model expected to be use - working_dir: the working directory of the agent. This should be set either in cli or in the config file + task: The task description you want your agent to solve + model: The model to use for execution + working_dir: The working directory for the agent. Set via CLI or config file - Return: - None (it is expected to be ended after calling the run function) + Returns: + None """ docker_config: dict[str, str | None] | None = None @@ -257,7 +258,7 @@ def run( elif docker_image: docker_config = {"image": docker_image} console.print(f"[blue]Docker mode enabled. Using image: {docker_image}[/blue]") - # --- ADDED END --- + # Docker mode configuration complete # Apply backward compatibility for config file config_file = resolve_config_file(config_file)