Skip to content

Commit f99014f

Browse files
committed
subprocess(fix): Type existing run timeouts
why: Byte-preserving callers cannot pass the runtime-supported timeout through the declared overloads under strict type checking. what: - Declare timeout on each SubprocessCommand.run overload - Keep the existing execution behavior and return types
1 parent e249b55 commit f99014f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/libvcs/_internal/subprocess.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ def run(
430430
universal_newlines: bool = ...,
431431
*,
432432
capture_output: bool = ...,
433+
timeout: float | None = ...,
433434
check: bool = ...,
434435
encoding: str | None = ...,
435436
errors: str | None = ...,
@@ -443,6 +444,7 @@ def run(
443444
universal_newlines: bool = ...,
444445
*,
445446
capture_output: bool = ...,
447+
timeout: float | None = ...,
446448
check: bool = ...,
447449
encoding: str,
448450
errors: str | None = ...,
@@ -456,6 +458,7 @@ def run(
456458
universal_newlines: bool = ...,
457459
*,
458460
capture_output: bool = ...,
461+
timeout: float | None = ...,
459462
check: bool = ...,
460463
encoding: str | None = ...,
461464
errors: str,
@@ -470,6 +473,7 @@ def run(
470473
universal_newlines: t.Literal[True],
471474
# where the *real* keyword only args start
472475
capture_output: bool = ...,
476+
timeout: float | None = ...,
473477
check: bool = ...,
474478
encoding: str | None = ...,
475479
errors: str | None = ...,
@@ -483,6 +487,7 @@ def run(
483487
universal_newlines: t.Literal[False] = ...,
484488
*,
485489
capture_output: bool = ...,
490+
timeout: float | None = ...,
486491
check: bool = ...,
487492
encoding: None = ...,
488493
errors: None = ...,

0 commit comments

Comments
 (0)