<commit_before>import logging

from .formats import dbc
from .formats import kcd
from .formats import sym
from .database import Database


LOGGER = logging.getLogger(__name__)


class File(object):
    """This class contains all messages, signals and definitions of a CAN
    network.

    The factory functions :func:`cantools.db.load()`,
    :func:`cantools.db.load_file()` and
    :func:`cantools.db.load_string()` returns instances of this class.

    """

    def __init__(self,
                 messages=None,
                 nodes=None,
                 buses=None,
                 version=None,
                 attribute_definitions=None,
                 attribute_definition_defaults=None):
        self._messages = messages if messages else []
        self._nodes = nodes if nodes else []
        self._buses = buses if buses else []
        self._name_to_message = {}
        self._frame_id_to_message = {}
        self._version = version

        if not attribute_definitions:
            attribute_definitions = []

        self._attribute_definitions = attribute_definitions

        if not attribute_definition_defaults:
            attribute_definition_defaults = []

        self._attribute_definition_defaults = attribute_definition_defaults

    @property
    def messages(self):<commit_msg>Cleanup.<commit_after>import logging

from .formats import dbc
from .formats import kcd
from .formats import sym
from .database import Database


LOGGER = logging.getLogger(__name__)


class File(object):
    """This class contains all messages, signals and definitions of a CAN
    network.

    The factory functions :func:`cantools.db.load()`,
    :func:`cantools.db.load_file()` and
    :func:`cantools.db.load_string()` returns instances of this class.

    """

    def __init__(self,
                 messages=None,
                 nodes=None,
                 buses=None,
                 version=None,
                 attribute_definitions=None,
                 attribute_definition_defaults=None):
        self._messages = messages if messages else []
        self._nodes = nodes if nodes else []
        self._buses = buses if buses else []
        self._name_to_message = {}
        self._frame_id_to_message = {}
        self._version = version
        self._attribute_definitions = (attribute_definitions
                                       if attribute_definitions
                                       else [])
        self._attribute_definition_defaults = (attribute_definition_defaults
                                               if attribute_definition_defaults
                                               else [])

    @property
    def messages(self):
{'fraction_non_alphanumeric': 0.07521304186735828, 'fraction_numerical': 0.0, 'mean_word_length': 2.033707865168539, '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': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '723947', 'n_tokens_mistral': 673, 'n_tokens_neox': 648, 'n_words': 173}