Skip to content

Commit ced26e4

Browse files
sbryngelsonclaude
andcommitted
viz: warn when --slice-* flags are ignored in --interactive mode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 64257b4 commit ced26e4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

toolchain/mfc/viz/viz.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,13 @@ def read_step(step):
360360

361361
# Interactive mode — launch Dash web server
362362
if interactive:
363+
ignored = [f for f in ('slice_index', 'slice_value')
364+
if ARG(f) is not None]
365+
if ARG('slice_axis') != 'z':
366+
ignored.insert(0, 'slice_axis')
367+
if ignored:
368+
cons.print(f"[yellow]Warning:[/yellow] {', '.join('--' + f.replace('_', '-') for f in ignored)} "
369+
"ignored in --interactive mode (use the UI controls instead).")
363370
from .interactive import run_interactive # pylint: disable=import-outside-toplevel
364371
port = ARG('port')
365372
host = ARG('host')

0 commit comments

Comments
 (0)