chore: in-progress CLI and device changes

Work in progress from the same tree as the controller's sequences-v2 changes.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Haiku 5.5 committed 2026-11-11 14:10:55 +13:00
1 parent 892ccaec71
commit c9dea6e142
2 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -631,7 +631,7 @@ Examples:
src_entry = os.path.join(src_dir, entry)
dst_entry = os.path.join(temp_src, entry)
if os.path.isdir(src_entry):
shutil.copytree(src_entry, dst_entry)
shutil.copytree(src_entry, dst_entry, ignore=shutil.ignore_patterns('__pycache__', '*.pyc', '*.pyo'))
else:
shutil.copy2(src_entry, dst_entry)
print(
+9
View File
@@ -122,6 +122,13 @@ class DeviceConnection:
if not os.path.isdir(local_dir):
raise ValueError(f"{local_dir} is not a directory")
# Host bytecode must never reach the device: remove it before uploading.
import shutil
for root, dirs, _files in os.walk(local_dir):
for d in [d for d in dirs if d == "__pycache__"]:
shutil.rmtree(os.path.join(root, d), ignore_errors=True)
dirs.remove(d)
self.connect()
try:
# Determine remote directory name
@@ -158,6 +165,8 @@ class DeviceConnection:
# Copy files
for file in files:
if file.endswith((".pyc", ".pyo")):
continue
local_file = os.path.join(root, file)
# Handle root directory case properly
if remote_base == '/':