mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-04 02:17:41 +08:00
Reformat pexpect_helper.py with black
This commit is contained in:
parent
4118bda21c
commit
f373e6e923
@ -28,6 +28,7 @@ TIMEOUT_SECS = 5
|
||||
|
||||
UNEXPECTED_SUCCESS = object()
|
||||
|
||||
|
||||
def get_prompt_re(counter):
|
||||
"""Return a regular expression for matching a with a given prompt counter."""
|
||||
return re.compile(
|
||||
@ -129,7 +130,9 @@ class SpawnedProc(object):
|
||||
function to ensure that each printed prompt is distinct.
|
||||
"""
|
||||
|
||||
def __init__(self, name="fish", timeout=TIMEOUT_SECS, env=os.environ.copy(), **kwargs):
|
||||
def __init__(
|
||||
self, name="fish", timeout=TIMEOUT_SECS, env=os.environ.copy(), **kwargs
|
||||
):
|
||||
"""Construct from a name, timeout, and environment.
|
||||
|
||||
Args:
|
||||
@ -146,7 +149,9 @@ class SpawnedProc(object):
|
||||
self.colorize = sys.stdout.isatty() or env.get("FISH_FORCE_COLOR", "0") == "1"
|
||||
self.messages = []
|
||||
self.start_time = None
|
||||
self.spawn = pexpect.spawn(exe_path, env=env, encoding="utf-8", timeout=timeout, **kwargs)
|
||||
self.spawn = pexpect.spawn(
|
||||
exe_path, env=env, encoding="utf-8", timeout=timeout, **kwargs
|
||||
)
|
||||
self.spawn.delaybeforesend = None
|
||||
self.prompt_counter = 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user