Skip to content

Commit c0170b7

Browse files
committed
internal/subprocess(refactor[typing]): Align pass_fds with typeshed
why: Use Collection[int] to match Python's official typeshed, allowing sets and frozensets which subprocess accepts at runtime. what: - Change pass_fds type from Sequence[int] to Collection[int] - Update both subprocess.py and run.py
1 parent c906c75 commit c0170b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libvcs/_internal/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import subprocess
1616
import sys
1717
import typing as t
18-
from collections.abc import Iterable, Mapping, MutableMapping, Sequence
18+
from collections.abc import Collection, Iterable, Mapping, MutableMapping, Sequence
1919

2020
from libvcs import exc
2121
from libvcs._internal.types import StrPath
@@ -119,7 +119,7 @@ def run(
119119
creationflags: int = 0,
120120
restore_signals: bool = True,
121121
start_new_session: bool = False,
122-
pass_fds: Sequence[int] = (),
122+
pass_fds: Collection[int] = (),
123123
*,
124124
encoding: str | None = None,
125125
errors: str | None = None,

src/libvcs/_internal/subprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import subprocess
4646
import sys
4747
import typing as t
48-
from collections.abc import Mapping, Sequence
48+
from collections.abc import Collection, Mapping, Sequence
4949

5050
from libvcs._internal.types import StrOrBytesPath
5151

@@ -109,7 +109,7 @@ class SubprocessCommand(SkipDefaultFieldsReprMixin):
109109
# POSIX-only
110110
restore_signals: bool = True
111111
start_new_session: bool = False
112-
pass_fds: Sequence[int] = ()
112+
pass_fds: Collection[int] = ()
113113
umask: int = -1
114114
pipesize: int = -1
115115
user: str | None = None

0 commit comments

Comments
 (0)