Просмотр исходного кода

style(code-runtime-python): keep the teardown v8-ignore under the line limit

The directive carried its whole justification inline at 203 characters, past the
140 the @stylistic/max-len rule allows (imports and template-literal messages
are exempt; a line comment is not). The reasoning moves to the lines above and
the directive keeps a short pointer, since a v8 ignore must stay on one line.
Chinesezjc 1 месяц назад
Родитель
Сommit
0a46bb3414
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      packages/code-runtime/code-runtime-python/src/index.ts

+ 4 - 1
packages/code-runtime/code-runtime-python/src/index.ts

@@ -1428,7 +1428,10 @@ export class PythonCodeRuntime extends CodeRuntime {
           // falls through, which is also the behavior on platforms with no
           // `/proc` to read.
           const nowStarted = readProcessStart(child.pid)
-          /* v8 ignore next -- the refusal arm needs a real pid recycled into a new group leader between spawn and teardown, which no test can schedule; `readProcessStart` is covered directly instead. */
+          // The refusal arm needs a real pid recycled into a new group leader
+          // between spawn and teardown, which no test can schedule; the reader
+          // itself is covered directly by the process-identity test.
+          /* v8 ignore next -- unreachable without real pid reuse; see above. */
           if (leaderStarted !== undefined && nowStarted !== undefined && nowStarted !== leaderStarted) return
           process.kill(-child.pid, sig)
         } catch {