Skip to content

Commit 195f473

Browse files
leeyyicursoragent
authored andcommitted
style: 修复 yapf 格式校验报错
CI 的 yapf lint 在三处与本仓库的 [tool.yapf] (based_on_style=pep8, column_limit=120) 不一致,本提交按 yapf 建议自动修正: - trpc_agent_sdk/code_executors/__init__.py: 删除 import 块和 __all__ 之间的多余空行(同段跨语义边界 yapf 不允许双空行)。 - trpc_agent_sdk/code_executors/cube/_code_executor.py: ``Field(default_factory=...)`` 单行表达式 < 120 列,yapf 折叠 为单行。 - trpc_agent_sdk/code_executors/local/_local_ws_runtime.py: 超过 120 列的 ``self._build_manifest_output(...)`` 调用按 yapf 默认风格逐参数换行。 无逻辑变更;仅排版。 Assisted-by: Cursor:claude-opus-4.7 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0c2257c commit 195f473

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

trpc_agent_sdk/code_executors/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
from .local import create_local_workspace_runtime
9393
from .utils import CodeExecutionUtils
9494

95-
9695
__all__ = [
9796
"load_artifact_helper",
9897
"parse_artifact_ref",

trpc_agent_sdk/code_executors/cube/_code_executor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ class CubeCodeExecutor(BaseCodeExecutor):
9090
# at call time so the base list stays the single source of truth;
9191
# callers may still override via the ``code_block_delimiters`` field
9292
# at construction time.
93-
code_block_delimiters: list[CodeBlockDelimiter] = Field(
94-
default_factory=_cube_default_code_block_delimiters,
95-
)
93+
code_block_delimiters: list[CodeBlockDelimiter] = Field(default_factory=_cube_default_code_block_delimiters, )
9694

9795
# `_client` is `Optional` because :meth:`close` / :meth:`destroy`
9896
# legitimately drop the handle post-construction. `_cfg` has no such

trpc_agent_sdk/code_executors/local/_local_ws_runtime.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,11 @@ async def collect_outputs(self,
499499

500500
real_root, matches = self._enumerate_local_matches(ws.path, normalize_globs(spec.globs))
501501
out, saved_names, saved_vers = await self._build_manifest_output(
502-
real_root, spec, matches, self._fetch_bytes, ctx,
502+
real_root,
503+
spec,
504+
matches,
505+
self._fetch_bytes,
506+
ctx,
503507
)
504508

505509
# Record output in workspace metadata (local-only bookkeeping).

0 commit comments

Comments
 (0)