<commit_before>import sys

import click

from gravity import config_manager, options
from gravity import process_manager
from gravity.io import info, exception


@click.command("start")
@options.required_instance_arg()
@click.option("-f", "--foreground", is_flag=True, default=False, help="Run in foreground")
@options.no_log_option()
@click.pass_context
def cli(ctx, foreground, instance, quiet=False):
    """Start configured services."""
    if not instance:
        with config_manager.config_manager(state_dir=ctx.parent.state_dir) as cm:
            # If there are no configs registered, we will attempt to auto-register one
            cm.auto_register()
        if not cm.instance_count:
            exception(
                "Nothing to start: no Galaxy instances configured and no Galaxy configuration files found, "
                "see `galaxyctl register --help`")
            sys.exit(1)
    with process_manager.process_manager(state_dir=ctx.parent.state_dir, foreground=foreground) as pm:
        pm.start(instance)<commit_msg>Drop unneeded sys.exit<commit_after>import click

from gravity import config_manager, options
from gravity import process_manager
from gravity.io import info, exception


@click.command("start")
@options.required_instance_arg()
@click.option("-f", "--foreground", is_flag=True, default=False, help="Run in foreground")
@options.no_log_option()
@click.pass_context
def cli(ctx, foreground, instance, quiet=False):
    """Start configured services."""
    if not instance:
        with config_manager.config_manager(state_dir=ctx.parent.state_dir) as cm:
            # If there are no configs registered, we will attempt to auto-register one
            cm.auto_register()
        if not cm.instance_count:
            exception(
                "Nothing to start: no Galaxy instances configured and no Galaxy configuration files found, "
                "see `galaxyctl register --help`")
    with process_manager.process_manager(state_dir=ctx.parent.state_dir, foreground=foreground) as pm:
        pm.start(instance)
{'fraction_non_alphanumeric': 0.09509946627850557, 'fraction_numerical': 0.00048520135856380397, 'mean_word_length': 3.6337078651685393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5691313', 'n_tokens_mistral': 563, 'n_tokens_neox': 550, 'n_words': 168}