-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
325 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# python2 shim | ||
pexpect.utils.InterruptedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "4.8.*" | ||
version = "4.9.*" | ||
upstream_repository = "https://github.com/pexpect/pexpect" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
import asyncio | ||
from _typeshed import Incomplete | ||
from typing import AnyStr, Generic | ||
|
||
async def expect_async(expecter, timeout: Incomplete | None = None): ... | ||
async def repl_run_command_async(repl, cmdlines, timeout: int = -1): ... | ||
from .expect import Expecter | ||
|
||
class PatternWaiter(asyncio.Protocol): | ||
transport: Incomplete | ||
expecter: Incomplete | ||
fut: Incomplete | ||
def set_expecter(self, expecter) -> None: ... | ||
def found(self, result) -> None: ... | ||
def error(self, exc) -> None: ... | ||
def connection_made(self, transport) -> None: ... | ||
def data_received(self, data) -> None: ... | ||
async def expect_async(expecter: Expecter[AnyStr], timeout: float | None = None) -> int: ... | ||
async def repl_run_command_async(repl, cmdlines, timeout: float | None = -1): ... | ||
|
||
class PatternWaiter(asyncio.Protocol, Generic[AnyStr]): | ||
transport: asyncio.ReadTransport | None | ||
expecter: Expecter[AnyStr] | ||
fut: asyncio.Future[int] | ||
def set_expecter(self, expecter: Expecter[AnyStr]) -> None: ... | ||
def found(self, result: int) -> None: ... | ||
def error(self, exc: BaseException | type[BaseException]) -> None: ... | ||
def connection_made(self, transport: asyncio.BaseTransport) -> None: ... | ||
def data_received(self, data: bytes) -> None: ... | ||
def eof_received(self) -> None: ... | ||
def connection_lost(self, exc) -> None: ... | ||
def connection_lost(self, exc: BaseException | type[BaseException] | None) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
from _typeshed import Incomplete | ||
from io import BytesIO, StringIO | ||
import re | ||
from collections.abc import Iterable | ||
from typing import AnyStr, Generic | ||
|
||
from .exceptions import EOF, TIMEOUT | ||
from .spawnbase import SpawnBase | ||
from .spawnbase import SpawnBase, _CompiledRePattern, _CompiledStringPattern, _Searcher | ||
|
||
class searcher_string: | ||
class searcher_string(Generic[AnyStr]): | ||
eof_index: int | ||
timeout_index: int | ||
longest_string: int | ||
def __init__(self, strings) -> None: ... | ||
match: Incomplete | ||
start: Incomplete | ||
end: Incomplete | ||
def search(self, buffer, freshlen, searchwindowsize: Incomplete | None = None): ... | ||
def __init__(self, strings: Iterable[_CompiledStringPattern[AnyStr]]) -> None: ... | ||
match: AnyStr | ||
start: int | ||
end: int | ||
def search(self, buffer: AnyStr, freshlen: int, searchwindowsize: int | None = None): ... | ||
|
||
class searcher_re: | ||
class searcher_re(Generic[AnyStr]): | ||
eof_index: int | ||
timeout_index: int | ||
def __init__(self, patterns) -> None: ... | ||
start: Incomplete | ||
match: Incomplete | ||
end: Incomplete | ||
def search(self, buffer, freshlen: int, searchwindowsize: int | None = None): ... | ||
def __init__(self, patterns: Iterable[_CompiledRePattern[AnyStr]]) -> None: ... | ||
match: re.Match[AnyStr] | ||
start: int | ||
end: int | ||
def search(self, buffer: AnyStr, freshlen: int, searchwindowsize: int | None = None): ... | ||
|
||
class Expecter: | ||
spawn: BytesIO | StringIO | ||
searcher: searcher_re | searcher_string | ||
class Expecter(Generic[AnyStr]): | ||
spawn: SpawnBase[AnyStr] | ||
searcher: _Searcher[AnyStr] | ||
searchwindowsize: int | None | ||
lookback: searcher_string | searcher_re | int | None | ||
def __init__(self, spawn: SpawnBase, searcher: searcher_re | searcher_string, searchwindowsize: int = -1) -> None: ... | ||
def do_search(self, window: str, freshlen: int): ... | ||
def existing_data(self): ... | ||
def new_data(self, data: Incomplete): ... | ||
def eof(self, err: Incomplete | None = None) -> int | EOF: ... | ||
def timeout(self, err: object | None = None) -> int | TIMEOUT: ... | ||
lookback: _Searcher[AnyStr] | int | None | ||
def __init__(self, spawn: SpawnBase[AnyStr], searcher: _Searcher[AnyStr], searchwindowsize: int | None = -1) -> None: ... | ||
def do_search(self, window: AnyStr, freshlen: int) -> int: ... | ||
def existing_data(self) -> int: ... | ||
def new_data(self, data: AnyStr) -> int: ... | ||
def eof(self, err: object = None) -> int: ... | ||
def timeout(self, err: object = None) -> int: ... | ||
def errored(self) -> None: ... | ||
def expect_loop(self, timeout: int = -1): ... | ||
def expect_loop(self, timeout: float | None = -1) -> int: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
from _typeshed import Incomplete | ||
from _typeshed import FileDescriptorLike | ||
from collections.abc import Iterable | ||
from typing import AnyStr | ||
|
||
from .spawnbase import SpawnBase, _Logfile | ||
|
||
class fdspawn(SpawnBase): | ||
args: Incomplete | ||
command: Incomplete | ||
child_fd: Incomplete | ||
__all__ = ["fdspawn"] | ||
|
||
class fdspawn(SpawnBase[AnyStr]): | ||
args: None | ||
command: None | ||
child_fd: int | ||
own_fd: bool | ||
closed: bool | ||
name: Incomplete | ||
use_poll: Incomplete | ||
name: str | ||
use_poll: bool | ||
def __init__( | ||
self, | ||
fd, | ||
args: Incomplete | None = None, | ||
timeout: int = 30, | ||
fd: FileDescriptorLike, | ||
args: None = None, | ||
timeout: float | None = 30, | ||
maxread: int = 2000, | ||
searchwindowsize: Incomplete | None = None, | ||
searchwindowsize: int | None = None, | ||
logfile: _Logfile | None = None, | ||
encoding: Incomplete | None = None, | ||
encoding: str | None = None, | ||
codec_errors: str = "strict", | ||
use_poll: bool = False, | ||
) -> None: ... | ||
def close(self) -> None: ... | ||
def isalive(self) -> bool: ... | ||
def terminate(self, force: bool = False) -> None: ... | ||
def send(self, s: str | bytes) -> bytes: ... | ||
def sendline(self, s: str | bytes) -> bytes: ... | ||
def send(self, s: str | bytes) -> int: ... | ||
def sendline(self, s: str | bytes) -> int: ... | ||
def write(self, s) -> None: ... | ||
def writelines(self, sequence) -> None: ... | ||
def read_nonblocking(self, size: int = 1, timeout: int | None = -1) -> bytes: ... | ||
def writelines(self, sequence: Iterable[str | bytes]) -> None: ... | ||
def read_nonblocking(self, size: int = 1, timeout: float | None = -1) -> AnyStr: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.