(checks)
List active or available environments.
List active or available environments.
List active or available environments .
def ls(checks):
    """List active or available environments."""
    if checks:
        testable_checks = sorted(get_testable_checks() & set(checks))

        if not testable_checks:
            echo_warning(f"No testable checks found for: {', '.join(checks)}")

        for check in testable_checks:
            envs = get_available_tox_envs(check, e2e_only=True)

            if envs:
                echo_success(f'{check}:')
                for env in envs:
                    echo_info(env, indent=True)
            else:
                echo_warning(f'No envs found for check: {check}')

    else:
        found = False
        for check in get_configured_checks():
            envs = get_configured_envs(check)

            if envs:
                found = True
                echo_success(f'{check}:')
                for env in envs:
                    echo_info(env, indent=True)

        if not found:
            echo_warning('No envs found for configured checks')
def ls ( checks ) : if checks : testable_checks = sorted ( get_testable_checks ( ) & set ( checks ) ) if not testable_checks : echo_warning ( f"No testable checks found for: {', '.join(checks)}" ) for check in testable_checks : envs = get_available_tox_envs ( check , e2e_only = True ) if envs : echo_success ( f'{check}:' ) for env in envs : echo_info ( env , indent = True ) else : echo_warning ( f'No envs found for check: {check}' ) else : found = False for check in get_configured_checks ( ) : envs = get_configured_envs ( check ) if envs : found = True echo_success ( f'{check}:' ) for env in envs : echo_info ( env , indent = True ) if not found : echo_warning ( 'No envs found for configured checks' )