Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions stubs/pexpect/pexpect/popen_spawn.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import subprocess
from _typeshed import StrOrBytesPath
from collections.abc import Callable
from os import _Environ
from typing import AnyStr

from .spawnbase import SpawnBase, _Logfile
Expand All @@ -17,7 +16,7 @@ class PopenSpawn(SpawnBase[AnyStr]):
searchwindowsize: int | None = None,
logfile: _Logfile | None = None,
cwd: StrOrBytesPath | None = None,
env: _Environ[str] | None = None,
env: subprocess._ENV | None = None,
encoding: str | None = None,
codec_errors: str = "strict",
preexec_fn: Callable[[], None] | None = None,
Expand Down
9 changes: 4 additions & 5 deletions stubs/pexpect/pexpect/pty_spawn.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from _typeshed import FileDescriptorOrPath
from collections.abc import Callable
from os import _Environ
from collections.abc import Callable, Mapping
from typing import AnyStr

from .spawnbase import SpawnBase, _Logfile
Expand All @@ -14,7 +13,7 @@ class spawn(SpawnBase[AnyStr]):
STDERR_FILENO: int
str_last_chars: int
cwd: FileDescriptorOrPath | None
env: _Environ[str]
env: Mapping[str, str] | None
echo: bool
ignore_sighup: bool
command: str
Expand All @@ -30,7 +29,7 @@ class spawn(SpawnBase[AnyStr]):
searchwindowsize: int | None = None,
logfile: _Logfile | None = None,
cwd: FileDescriptorOrPath | None = None,
env: _Environ[str] | None = None,
env: Mapping[str, str] | None = None,
ignore_sighup: bool = False,
echo: bool = True,
preexec_fn: Callable[[], None] | None = None,
Expand Down Expand Up @@ -84,7 +83,7 @@ def spawnu(
searchwindowsize: int | None = None,
logfile: _Logfile | None = None,
cwd: FileDescriptorOrPath | None = None,
env: _Environ[str] | None = None,
env: Mapping[str, str] | None = None,
ignore_sighup: bool = False,
echo: bool = True,
preexec_fn: Callable[[], None] | None = None,
Expand Down
4 changes: 2 additions & 2 deletions stubs/pexpect/pexpect/pxssh.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from _typeshed import FileDescriptorOrPath
from os import _Environ
from collections.abc import Mapping
from typing import AnyStr, Literal

from .exceptions import ExceptionPexpect
Expand Down Expand Up @@ -28,7 +28,7 @@ class pxssh(spawn[AnyStr]):
searchwindowsize: int | None = None,
logfile: _Logfile | None = None,
cwd: FileDescriptorOrPath | None = None,
env: _Environ[str] | None = None,
env: Mapping[str, str] | None = None,
ignore_sighup: bool = True,
echo: bool = True,
options: dict[str, str] = {},
Expand Down
6 changes: 3 additions & 3 deletions stubs/pexpect/pexpect/run.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from _typeshed import FileDescriptorOrPath
from os import _Environ
from collections.abc import Mapping
from typing import AnyStr

from .spawnbase import _InputRePattern, _Logfile
Expand All @@ -12,7 +12,7 @@ def run(
extra_args: None = None,
logfile: _Logfile | None = None,
cwd: FileDescriptorOrPath | None = None,
env: _Environ[str] | None = None,
env: Mapping[str, str] | None = None,
**kwargs,
) -> AnyStr | tuple[AnyStr, int]: ...
def runu(
Expand All @@ -23,6 +23,6 @@ def runu(
extra_args: None = None,
logfile: _Logfile | None = None,
cwd: FileDescriptorOrPath | None = None,
env: _Environ[str] | None = None,
env: Mapping[str, str] | None = None,
**kwargs,
) -> AnyStr | tuple[AnyStr, int]: ...
4 changes: 2 additions & 2 deletions stubs/pexpect/pexpect/utils.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from os import _Environ
from collections.abc import Mapping

InterruptedError: type
string_types: tuple[type, ...]

def is_executable_file(path): ...
def which(filename, env: _Environ[str] | None = None): ...
def which(filename, env: Mapping[str, str] | None = None): ...
def split_command_line(command_line): ...
def select_ignore_interrupts(iwtd, owtd, ewtd, timeout: float | None = None): ...
def poll_ignore_interrupts(fds, timeout: float | None = None): ...