Fixes wrong negative argparse.BooleanOptionalAction argument name - #6560
Merged
Merged
Conversation
studio.backend.run.__main__ adds "--secure" argument via argparse.BooleanOptionalAction, which automatically creates negative --no-secure, that is with **NO** prefix, instead of **NOT**.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
There was a problem hiding this comment.
Code Review
This pull request renames the --not-secure CLI flag to --no-secure across the codebase, including CLI definitions, argument forwarding, error messages, help text, and corresponding unit tests. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Member
|
Thanks! |
danielhanchen
added a commit
that referenced
this pull request
Jun 22, 2026
…6568) * Studio: accept --not-secure as a back-compat alias for --no-secure PR #6560 renamed the negative secure flag from --not-secure to --no-secure to match argparse.BooleanOptionalAction. Re-add --not-secure as a hidden, deprecated alias at both CLI layers so existing scripts and muscle memory keep working, while --no-secure stays the documented spelling. - studio/backend/run.py: extract the CLI parser into _build_arg_parser() so the flag wiring is unit-testable, and register --not-secure as a hidden store_false alias for --no-secure. Last flag wins, matching BooleanOptionalAction semantics. - unsloth_cli/commands/studio.py: add a hidden --not-secure option to `unsloth studio` and `unsloth studio run`; it forces secure off and forwards the canonical --no-secure to the backend. - Tests at both layers for the alias and its polarity. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Studio: address review on --not-secure alias - run.py: use argparse.SUPPRESS for the --not-secure default so the alias never contributes a namespace default (the canonical --secure owns it). - studio.py: resolve --not-secure last-wins from argv via _resolve_secure() so `--not-secure --secure` keeps secure on, matching the backend's BooleanOptionalAction and how --secure/--no-secure already behave. - Add a CLI last-wins test covering both flag orders. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.
studio.backend.run.main adds "--secure" argument via argparse.BooleanOptionalAction, which automatically creates negative --no-secure, that is with NO prefix, instead of NOT.