fix(python_repl): drive non-interactive mode from STRANDS_NON_INTERACTIVE#518
Draft
yonib05 wants to merge 2 commits into
Draft
fix(python_repl): drive non-interactive mode from STRANDS_NON_INTERACTIVE#518yonib05 wants to merge 2 commits into
yonib05 wants to merge 2 commits into
Conversation
…TIVE Non-interactive mode was selected by a non_interactive_mode keyword argument, which let a caller suppress the execution confirmation prompt per invocation. Read it from the STRANDS_NON_INTERACTIVE environment variable instead, matching shell.py, so suppressing the prompt is an operator decision and the keyword argument no longer bypasses confirmation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
python_replselected non-interactive mode from anon_interactive_modekeyword argument:
This let a caller suppress the execution confirmation prompt per invocation.
shell.pyalready reads this from theSTRANDS_NON_INTERACTIVEenvironmentvariable. This change brings
python_replin line: non-interactive mode is nowan operator/environment setting rather than a per-call keyword argument.
Changes
non_interactive_modefromSTRANDS_NON_INTERACTIVE, matchingshell.py.STRANDS_NON_INTERACTIVEin the tool description.and add a test that passing the keyword no longer suppresses the prompt.
Testing
pytest tests/test_python_repl.pypasses.ruff format --checkandruff checkpass on the changed files.