Skip to content

Commit fb4cafc

Browse files
peppa
1 parent 608a93e commit fb4cafc

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

moler/config/connections.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ def terminal_nofork_thd_conn_st(name=None):
228228
io_conn = ThreadedTerminalNoForkPTY(moler_connection=mlr_conn) # TODO: add name, logger
229229
return io_conn
230230

231-
232231
# TODO: unify passing logger to io_conn (logger/logger_name)
233232
connection_factory.register_construction(io_type="terminal",
234233
variant="threaded",
@@ -244,7 +243,6 @@ def terminal_nofork_thd_conn_st(name=None):
244243
variant="single-threaded",
245244
constructor=terminal_thd_conn_st)
246245

247-
248246
# TODO: unify passing logger to io_conn (logger/logger_name)
249247
connection_factory.register_construction(io_type="terminal_no_forkpty",
250248
variant="threaded",
@@ -260,6 +258,7 @@ def terminal_nofork_thd_conn_st(name=None):
260258
variant="single-threaded",
261259
constructor=terminal_nofork_thd_conn_st)
262260

261+
263262
def _register_builtin_py3_unix_connections(connection_factory, moler_conn_class):
264263
from moler.io.asyncio.terminal import AsyncioTerminal, AsyncioInThreadTerminal
265264

moler/io/raw/terminal_no_forkpty.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@
2828

2929
class PtyProcessUnicodeNotFork:
3030
"""PtyProcessUnicode without forking process."""
31-
def __init__(self, cmd: str = "/bin/bash", dimensions: Tuple[int, int]=(25, 120), buffer_size: int=4096):
31+
def __init__(self, cmd: str = "/bin/bash", dimensions: Tuple[int, int] =( 25, 120), buffer_size: int = 4096):
3232
self.cmd = cmd
3333
self.dimensions = dimensions
3434
self.buffer_size = buffer_size
3535
self.delayafterclose = 0.2
3636
encoding = "utf-8"
3737
self.decoder = codecs.getincrementaldecoder(encoding)(errors='strict')
38-
self.fd : int = -1 # File descriptor for pty master
39-
self.pid : int = -1 # Process ID of the child process
40-
self.slave_fd : int = -1 # File descriptor for pty slave
41-
self.process : Optional[subprocess.Popen] = None # Subprocess.Popen object
42-
self._closed : bool = True
38+
self.fd: int = -1 # File descriptor for pty master
39+
self.pid: int = -1 # Process ID of the child process
40+
self.slave_fd: int = -1 # File descriptor for pty slave
41+
self.process: Optional[subprocess.Popen] = None # Subprocess.Popen object
42+
self._closed: bool = True
4343

4444
def create_pty_process(self):
4545
"""Create PtyProcessUnicode without forking process."""

0 commit comments

Comments
 (0)