Skip to content

Commit

Permalink
Enable normal boolean to better interact with CLI apps
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Nov 3, 2015
1 parent c91e59c commit 2a11014
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hug/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def comma_separated_list(value):
float_number = accept(float, 'A float number', 'Invalid float number provided')
decimal = accept(Decimal, 'A decimal number', 'Invalid decimal number provided')
text = accept(str, 'Basic text / string value', 'Invalid text value provided')
boolean = accept(bool, 'Providing any value will set this to true', 'Invalid boolean value provided')
boolean = accept(bool, 'Providing any value will set this to true',
'Invalid boolean value provided', cli_behaviour={'action': 'store_true'})


def smart_boolean(input_value):
Expand Down

0 comments on commit 2a11014

Please sign in to comment.