From aa5e8fc3456598ada5a732604f38163af786360d Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Tue, 25 Aug 2026 14:06:22 +0800 Subject: [PATCH] fix(code-runtime-python): suppress the unnecessary-optional-chain lint for the stdin destroy The boot-write-failure fake child carries no stdin at runtime, so the optional call is the documented guard; the static type (ChildProcessWithoutNullStreams) says stdin is non-null, which trips the no-unnecessary-condition lint. --- packages/code-runtime/code-runtime-python/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/code-runtime/code-runtime-python/src/index.ts b/packages/code-runtime/code-runtime-python/src/index.ts index dc56a8bb0e..da9be817f9 100644 --- a/packages/code-runtime/code-runtime-python/src/index.ts +++ b/packages/code-runtime/code-runtime-python/src/index.ts @@ -995,6 +995,7 @@ export class PythonCodeRuntime extends CodeRuntime { // inheriting fd 0 would keep the host process from exiting even after the // closeDeadline forced settlement. The child (and any descendant) reads // EOF on fd 0 instead, and no host handle survives. + // oxlint-disable-next-line typescript/no-unnecessary-condition -- the boot-write-failure fake child has no stdin. child.stdin?.destroy() } catch (error: unknown) { try {