From 8dcd944a031b21846fb1674616347b1f8e0f67ac Mon Sep 17 00:00:00 2001 From: anor Date: Thu, 26 Mar 2026 15:46:04 +1000 Subject: [PATCH] =?UTF-8?q?fix:=20TypeError=20str/Path=20=D0=B2=20verify?= =?UTF-8?q?=5Fscript=20+=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=82=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20=D0=9A=D0=BE?= =?UTF-8?q?=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. verify_script получал str вместо Path → TypeError при job_dir / "file" Теперь: Path(job_dir) внутри функции 2. Кнопка «Копировать параметры» — inline под таблицей, контрастная (красная рамка) Co-Authored-By: Claude Opus 4.6 (1M context) --- batch_v3.py | 3 ++- static/batch3.html | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/batch_v3.py b/batch_v3.py index e104291..95ddd61 100644 --- a/batch_v3.py +++ b/batch_v3.py @@ -62,12 +62,13 @@ def verify_script( script: str, source_dir: str, target_file: str, - job_dir: Path, + job_dir: str | Path, ) -> dict: """Execute script on 2 sample files to verify correctness. Returns {"ok": True/False, "processed": int, "errors": [...], "error": str}. """ + job_dir = Path(job_dir) # Select 2 sample xlsx files all_xlsx = sorted( f for f in Path(source_dir).rglob("*.xlsx") diff --git a/static/batch3.html b/static/batch3.html index 43771e4..c86e630 100644 --- a/static/batch3.html +++ b/static/batch3.html @@ -32,8 +32,10 @@ pre { background: #2c2c2c; color: #f5f0eb; padding: .8rem; border-radius: 6px; o .info-row span { background: #ede5db; padding: 3px 10px; border-radius: 6px; } .spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; margin-right: 6px; } @keyframes spin { to { transform: rotate(360deg); } } -.copy-btn { position: absolute; top: 4px; right: 4px; padding: 3px 10px; font-size: .7rem; background: rgba(255,255,255,.85); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; z-index: 1; } -.copy-btn:hover { background: #fff; color: var(--text); } +.copy-btn { position: absolute; top: 4px; right: 4px; padding: 4px 12px; font-size: .75rem; background: var(--card); color: var(--accent); border: 1.5px solid var(--accent); border-radius: 4px; cursor: pointer; z-index: 1; font-weight: 600; } +.copy-btn:hover { background: var(--accent); color: #fff; } +.copy-btn-inline { display: inline-block; padding: 4px 14px; font-size: .75rem; background: var(--card); color: var(--accent); border: 1.5px solid var(--accent); border-radius: 4px; cursor: pointer; font-weight: 600; margin-top: .5rem; } +.copy-btn-inline:hover { background: var(--accent); color: #fff; } .verify-ok { background: #e8f5e9; border: 1px solid var(--green); border-radius: 6px; padding: .5rem .8rem; margin: .5rem 0; font-size: .85rem; color: var(--green); } .verify-fail { background: #fce4ec; border: 1px solid var(--accent); border-radius: 6px; padding: .5rem .8rem; margin: .5rem 0; font-size: .85rem; color: var(--accent); } @@ -75,10 +77,8 @@ pre { background: #2c2c2c; color: #f5f0eb; padding: .8rem; border-radius: 6px; o