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.
This commit is contained in:
Chinesezjc
2026-08-31 14:47:57 +08:00
committed by Tianyi Cui
parent aecdec3f80
commit aa5e8fc345
@@ -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 {