Skip to content

Commit

Permalink
Fix argparse_yes_no_flag
Browse files Browse the repository at this point in the history
Summary: Lower-case `-` for the destination field.

Reviewed By: wsanville

Differential Revision: D50503260

fbshipit-source-id: 71ea352c8831d895870475d80e4dbc4d9f312e88
  • Loading branch information
agampe authored and facebook-github-bot committed Oct 20, 2023
1 parent 0a75034 commit 58b38fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyredex/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def __call__(self, parser, namespace, values, option_string=None):
parser.add_argument(
f"--{on_prefix}{flag_name}",
f"--{off_prefix}{flag_name}",
dest=flag_name,
dest=flag_name.replace("-", "_"),
action=FlagAction,
default=False,
**kwargs,
Expand Down

0 comments on commit 58b38fb

Please sign in to comment.