<commit_before>import ruamel.yaml as yaml

from union import Union


def main():
    """
    Launches the bot
    """
    with open("config.yml", 'r') as stream:
        try:
            config = yaml.load(stream, yaml.Loader)
        except yaml.YAMLError as exc:
            print(exc)
            return

    bot = Union(config=config)

    try:
        bot.load_extension("union.core.core")
    except Exception as e:
        print(f"Failed to load core cog.\n{e.__class__.__name__}: {e}")
        return

    bot.run()


if __name__ == "__main__":
    main()<commit_msg>impr: switch to using CLoader when possible<commit_after>from ruamel.yaml import load, YAMLError
try:
    from ruamel.yaml import CLoader as Loader
except ImportError:
    from ruamel.yaml import Loader

from union import Union


def main():
    """
    Launches the bot
    """
    with open("config.yml", 'r') as stream:
        try:
            config = load(stream, Loader)
        except YAMLError as exc:
            print(exc)
            return

    bot = Union(config=config)

    try:
        bot.load_extension("union.core.core")
    except Exception as e:
        print(f"Failed to load core cog.\n{e.__class__.__name__}: {e}")
        return

    bot.run()


if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.10981308411214953, 'fraction_numerical': 0.0, 'mean_word_length': 2.228643216080402, 'pattern_counts': {'":': 2, '<': 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': '7157345', 'n_tokens_mistral': 418, 'n_tokens_neox': 402, 'n_words': 115}