(force)
Remove all configuration for environments.
Remove all configuration for environments.
Remove all configuration for environments .
def prune(force):
    """Remove all configuration for environments."""
    if not force:
        echo_warning(
            'Removing configuration of environments that may be in use will leave '
            'them in a potentially unusable state. If you wish to proceed (e.g. you '
            'have just restarted your machine), you may use the -f / --force flag.'
        )
        abort(code=2)

    checks = get_configured_checks()
    for check in checks:
        envs = get_configured_envs(check)

        if envs:
            echo_info(f'{check}:')
            for env in envs:
                echo_waiting(f'Removing `{env}`... ', nl=False, indent=True)
                remove_env_data(check, env)
                echo_success('success!')

        remove_env_root(check)
def prune ( force ) : if not force : echo_warning ( 'Removing configuration of environments that may be in use will leave ' 'them in a potentially unusable state. If you wish to proceed (e.g. you ' 'have just restarted your machine), you may use the -f / --force flag.' ) abort ( code = 2 ) checks = get_configured_checks ( ) for check in checks : envs = get_configured_envs ( check ) if envs : echo_info ( f'{check}:' ) for env in envs : echo_waiting ( f'Removing `{env}`... ' , nl = False , indent = True ) remove_env_data ( check , env ) echo_success ( 'success!' ) remove_env_root ( check )