-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Using the code below, the two following calls provide the same results:
- python main.py --pea
- python main.py --peanuts
In both case args.peanuts is set to True.
The arguments "--pea" should not be recognized as --peanuts
parser = argparse.ArgumentParser(
prog='MACD Screener and trader',
description='Monitor CryptoCurrency and perform trades based on MACD strategy'
parser.add_argument('-pe', "--peanuts", action='store_true', help='Check only the open orders')
args = parser.parse_args()
if args.peanuts:
print("Peanuts")
CPython versions tested on:
3.11
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error