Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix boolean command line options (#422)
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](https://docs.python.org/3/library/argparse.html#action). 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.
- Loading branch information