diff options
author | Douglas Winship <douglas.winship@codethink.co.uk> | 2020-06-17 15:05:28 +0100 |
---|---|---|
committer | Douglas Winship <douglas.winship@codethink.co.uk> | 2020-07-14 10:58:11 +0100 |
commit | 83679067624c8f01eca90046df42be8cac554930 (patch) | |
tree | d6178738a118e676d39cde44e1061515baa10c9d | |
parent | 7ff7fb5cde1b491c2e2a321b705d695f48980cfe (diff) | |
download | buildstream-83679067624c8f01eca90046df42be8cac554930.tar.gz |
fix tab-completion: hardcode default min versiondwinship/fix-tab-completion
Hardcodes the default min version as "2.0", instead of using a function.
(The function was causing an ImportError during tab completion,
because it attempts to import "__version__", which isn't available
at tab completion time.)
-rw-r--r-- | src/buildstream/_frontend/cli.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py index b9cb26666..ff68af66d 100644 --- a/src/buildstream/_frontend/cli.py +++ b/src/buildstream/_frontend/cli.py @@ -371,22 +371,10 @@ def help_command(ctx, command): ################################################################## # Init Command # ################################################################## -def default_min_version(): - from .. import utils - - bst_major, bst_minor = utils._get_bst_api_version() - - return "{}.{}".format(bst_major, bst_minor) - - @cli.command(short_help="Initialize a new BuildStream project") @click.option("--project-name", type=click.STRING, help="The project name to use") @click.option( - "--min-version", - type=click.STRING, - default=default_min_version(), - show_default=True, - help="The required format version", + "--min-version", type=click.STRING, default="2.0", show_default=True, help="The required format version", ) @click.option( "--element-path", |