def unset_variables(project_dir, vars_to_unset): """Unset the variables for local project. Returns: Returns exit code """ project = load_project(project_dir) status = project_ops.unset_variables(project, vars_to_unset) if status: print(status.status_description) return 0 else: console_utils.print_status_errors(status) return 1
def unset_variables(self, project, vars_to_unset, env_spec_name=None): """Unset variables' values in anaconda-project-local.yml. Returns a ``Status`` instance which evaluates to True on success and has an ``errors`` property (with a list of error strings) on failure. Args: project (Project): the project vars_to_unset (list of str): variable names env_spec_name (str): name of env spec to use Returns: ``Status`` instance """ return project_ops.unset_variables(project=project, vars_to_unset=vars_to_unset, env_spec_name=env_spec_name)
def unset_variables(self, project, env_spec_name, vars_to_unset, prepare_result=None): """Unset variables' values in anaconda-project-local.yml. Returns a ``Status`` instance which evaluates to True on success and has an ``errors`` property (with a list of error strings) on failure. Args: project (Project): the project env_spec_name (str): environment spec name or None for all environment specs vars_to_unset (list of str): variable names prepare_result (PrepareResult): result of a previous prepare or None Returns: ``Status`` instance """ return project_ops.unset_variables( project=project, env_spec_name=env_spec_name, vars_to_unset=vars_to_unset, prepare_result=prepare_result)