Skip to content

Commit

Permalink
Minor updates and comments to autoparse
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucretiel committed Oct 17, 2015
1 parent e788094 commit 6101a30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/autocommand/autoparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _make_arguments(param, used_char_args, add_nos):

# If there is no explicit type, and the default is present and not None,
# infer the type from the default.
if arg_type is None and default not in (_empty, None):
if arg_type is None and default not in {_empty, None}:
arg_type = type(default)

# Add default. The presence of a default means this is an option, not an
Expand Down Expand Up @@ -155,6 +155,7 @@ def _make_arguments(param, used_char_args, add_nos):

yield flags, arg_spec

# Create the --no- version for boolean switches
if add_nos and arg_type is bool:
flags = ['--no-{}'.format(name)]
arg_spec = {
Expand Down

0 comments on commit 6101a30

Please sign in to comment.