fix: accept yes/no on --encrypt for Classic parity - #450
Open
jacalata wants to merge 2 commits into
Open
Conversation
tabcmd Classic's `--encrypt` on `createextracts` takes an explicit yes/no value; tabcmd 2 treated it as a bare boolean flag, silently ignoring any following value. Scripts that pass `--encrypt no` on Classic ended up encrypting on tabcmd 2 because argparse consumed the "no" as a positional or bailed. Make --encrypt accept an optional yes|no|true|false argument (case-insensitive). Bare `--encrypt` still means True; omitted means False; explicit `--encrypt no` means False. This preserves current tabcmd 2 default behavior while matching Classic syntax.
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.
Summary
--encryptoncreateextractstakes an explicityesornovalue; tabcmd 2 treated it as a bare boolean flag, silently ignoring any following value.--encrypt noon Classic would have ended up encrypting on tabcmd 2 (argparse would consumenoas a positional or bail).--encryptaccept an optionalyes|no|true|falseargument (case-insensitive). Bare--encryptstill meansTrue; omitted meansFalse; explicit--encrypt nomeansFalse. Preserves current tabcmd 2 default while matching Classic syntax.Test plan
tests/parsers/test_parser_create_extracts.py— 8 new tests cover omitted / bare / yes / no / true / false / case-insensitive / bad-value-rejectedtest_parser_create_extracts.pysuite: 15 passed🤖 Generated with Claude Code