diff --git a/pipenv/cli/command.py b/pipenv/cli/command.py index ade86c6f69..34c45c7673 100644 --- a/pipenv/cli/command.py +++ b/pipenv/cli/command.py @@ -5,7 +5,7 @@ import sys from click import ( - argument, echo, edit, group, option, pass_context, secho, version_option, Choice + argument, echo, edit, group, option, pass_context, secho, types, version_option, Choice ) from ..__version__ import __version__ @@ -459,7 +459,8 @@ def run(state, command, args): @option( "--unused", nargs=1, - default=False, + default="", + type=types.STRING, help="Given a code path, show potentially unused dependencies.", ) @option( diff --git a/pipenv/cli/options.py b/pipenv/cli/options.py index 35af39ca56..7e0652a90d 100644 --- a/pipenv/cli/options.py +++ b/pipenv/cli/options.py @@ -235,9 +235,10 @@ def callback(ctx, param, value): if value is not None: state.python = validate_python_path(ctx, param, value) return value - return option("--python", default=False, nargs=1, callback=callback, + return option("--python", default="", nargs=1, callback=callback, help="Specify which version of Python virtualenv should use.", - expose_value=False, allow_from_autoenv=False)(f) + expose_value=False, allow_from_autoenv=False, + type=click.types.STRING)(f) def pypi_mirror_option(f): @@ -318,8 +319,9 @@ def callback(ctx, param, value): if value: state.installstate.requirementstxt = value return value - return option("--requirements", "-r", nargs=1, default=False, expose_value=False, - help="Import a requirements.txt file.", callback=callback)(f) + return option("--requirements", "-r", nargs=1, default="", expose_value=False, + help="Import a requirements.txt file.", callback=callback, + type=click.types.STRING)(f) def emit_requirements_flag(f): @@ -358,9 +360,9 @@ def callback(ctx, param, value): if value: state.installstate.code = value return value - return option("--code", "-c", nargs=1, default=False, help="Install packages " + return option("--code", "-c", nargs=1, default="", help="Install packages " "automatically discovered from import statements.", callback=callback, - expose_value=False)(f) + expose_value=False, type=click.types.STRING)(f) def deploy_option(f):