<commit_before>"""Declare the Koztumize application using Pynuts."""

import ldap
from pynuts import Pynuts


class Koztumize(Pynuts):
    """The class which open the ldap."""
    @property
    def ldap(self):
        """Open the ldap."""
        if 'LDAP' not in self.config:  # pragma: no cover
            self.config['LDAP'] = ldap.open(self.config['LDAP_HOST'])
        return self.config['LDAP']


app = Koztumize(
    __name__, config_file='config/config.cfg')  # pylint: disable=C0103<commit_msg>Use an environment variable as config file<commit_after>"""Declare the Koztumize application using Pynuts."""

import os
import ldap
from pynuts import Pynuts


class Koztumize(Pynuts):
    """The class which open the ldap."""
    @property
    def ldap(self):
        """Open the ldap."""
        if 'LDAP' not in self.config:  # pragma: no cover
            self.config['LDAP'] = ldap.open(self.config['LDAP_HOST'])
        return self.config['LDAP']


app = Koztumize(  # pylint: disable=E1101
    __name__,
    config_file=os.environ.get('KOZTUMIZE_CONFIG') or 'config/config.cfg')
{'fraction_non_alphanumeric': 0.13039485766758493, 'fraction_numerical': 0.0073461891643709825, 'mean_word_length': 3.3775100401606424, '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': '1274061', 'n_tokens_mistral': 380, 'n_tokens_neox': 361, 'n_words': 97}