Skip to content

Commit

Permalink
Fix handling of parameters in CLI
Browse files Browse the repository at this point in the history
- File default needs to be set in the decorator for it to have
  effective default value

- Default arguments in the function signature are not necessary,
  options are optional by default
  • Loading branch information
jasujm committed May 8, 2020
1 parent 9c04594 commit 24bf59f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/enumecg/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
help="Primary enumeration type",
)
@click.option("--value-type", help="Enumerator value type")
@click.argument("file", type=click.File())
def cli(file=sys.stdin, documentation=None, primary_type=None, value_type=None):
@click.argument("file", type=click.File(), default="-")
def cli(file, documentation, primary_type, value_type):
"""Generate C++ boilerplate for an Enhanced Enum definition
This executable is a part of the Enhanced Enum library. It is used
Expand Down

0 comments on commit 24bf59f

Please sign in to comment.