<commit_before>"""The main application entrypoint module."""
import os

import pyramid.config

from py_proxy.sentry_filters import SENTRY_FILTERS

REQUIRED_PARAMS = ["client_embed_url", "nginx_server", "legacy_via_url"]


def load_settings(settings):
    """Load application settings from a dict or environment variables.

    Checks that the required parameters are either filled out in the provided
    dict, or that the required values can be loaded from the environment.

    :param settings: Settings dict
    :raise ValueError: If a required parameter is not filled
    """
    for param in REQUIRED_PARAMS:
        value = settings[param] = settings.get(param, os.environ.get(param.upper()))

        if value is None:
            raise ValueError(f"Param {param} must be provided.")
<commit_msg>Fixing linting issues<commit_after>"""The main application entrypoint module."""
import os

import pyramid.config

from py_proxy.sentry_filters import SENTRY_FILTERS

REQUIRED_PARAMS = ["client_embed_url", "nginx_server", "legacy_via_url"]


def load_settings(settings):
    """Load application settings from a dict or environment variables.

    Checks that the required parameters are either filled out in the provided
    dict, or that the required values can be loaded from the environment.

    :param settings: Settings dict
    :raise ValueError: If a required parameter is not filled
    :return: A dict of settings
    """
    for param in REQUIRED_PARAMS:
        value = settings[param] = settings.get(param, os.environ.get(param.upper()))

        if value is None:
            raise ValueError(f"Param {param} must be provided.")

{'fraction_non_alphanumeric': 0.07776427703523693, 'fraction_numerical': 0.0, 'mean_word_length': 3.931137724550898, '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': '1405250', 'n_tokens_mistral': 445, 'n_tokens_neox': 438, 'n_words': 173}