Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix boolean command line options #422

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Fix boolean command line options #422

merged 2 commits into from
Nov 7, 2024

Conversation

fhenneke
Copy link
Collaborator

@fhenneke fhenneke commented Nov 7, 2024

This PR changes how boolean command line options are implemented.

With this change, adding --dry-run or --post-tx or --ignore-slippage as command line argument will switch the corresponding argument to True. Otherwise, it is set to False. The implementation follows what is describet here.

Before this change, adding --dry-run True was supposed to switch on the dry run option. A bit surprisingly, adding --dry-run False or --dry-run dummy also switched on the option as well. None of these ways to set the option are accepted with this PR. Adding --dry-run switches the option on, not adding the option switches it off.

This is a breaking change to the command line API. This PR should only be merged after adapting call sites appropriately.

Copy link
Contributor

@bram-vdberg bram-vdberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@harisang harisang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but would be good to address the comment i shared

@fhenneke fhenneke merged commit 3ef246d into main Nov 7, 2024
5 checks passed
@fhenneke fhenneke deleted the fix_bool_cli_flags branch November 7, 2024 17:05
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants