-
-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
type: featureA new enhacement proposalA new enhacement proposal
Description
Description
The cz cli only accepts upper case increment names, but some tools work with lower case names for the same increment types. So, to keep things simpler in scripts, it'd be great to don't care about transforming to lower/upper case.
Possible Solution
Since decli
is mostly a declarative wrapper around argparse
, maybe a simple str.upper
can be used as the type
for increment
.
This seems to work:
# rps.py
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'move',
choices=['ROCK', 'PAPER', 'SCISSORS'],
type=str.upper,
)
args = parser.parse_args()
print(args.move)
$ python rps.py rock
ROCK
Additional context
I can submit a PR if this is desirable.
Metadata
Metadata
Assignees
Labels
type: featureA new enhacement proposalA new enhacement proposal