Skip to content
Merged
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
4 changes: 4 additions & 0 deletions cli/src/mpftp/rawpaste.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def __init__(
self.use_raw_paste = True
self.device_name = device
self.mounted = False
# mpremote 1.29 reads is_pty when it waits for the board; its own
# __init__, skipped here, sets it from the device path.
is_pty = getattr(SerialTransport, "_is_pty_device", None)
self.is_pty = bool(is_pty(device)) if is_pty else False
kwargs: dict[str, Any] = {
"baudrate": baudrate,
"timeout": timeout,
Expand Down
1 change: 1 addition & 0 deletions cli/tests/test_stray_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def test_dtr_and_rts_are_low_before_the_port_opens(self):
self.assertTrue(make.call_args.kwargs.get("do_not_open"))
self.assertFalse(t.in_raw_repl)
self.assertTrue(t.use_raw_paste)
self.assertFalse(t.is_pty) # mpremote 1.29 reads it; a COM port is not a pty

def test_sidecar_holds_lines_low_on_a_uart_bridge_only(self):
ports = [
Expand Down
Loading