<commit_before>from django.conf import settings
from django.utils.module_loading import import_string


SUPPORTED_DATABASE_ENGINES = {
    'django.db.backends.sqlite3',
    'django.db.backends.postgresql',
    'django.db.backends.mysql',
    # TODO: Remove when we drop Django 2.x support.
    'django.db.backends.postgresql_psycopg2',

    # GeoDjango
    'django.contrib.gis.db.backends.spatialite',
    'django.contrib.gis.db.backends.postgis',
    'django.contrib.gis.db.backends.mysql',

    # django-transaction-hooks
    'transaction_hooks.backends.sqlite3',
    'transaction_hooks.backends.postgis',
    # TODO: Remove when we drop Django 2.x support.
    'transaction_hooks.backends.postgresql_psycopg2',
    'transaction_hooks.backends.mysql',
}

SUPPORTED_CACHE_BACKENDS = {
    'django.core.cache.backends.dummy.DummyCache',
    'django.core.cache.backends.locmem.LocMemCache',
    'django.core.cache.backends.filebased.FileBasedCache',
    'django_redis.cache.RedisCache',
    'django.core.cache.backends.memcached.MemcachedCache',
    'django.core.cache.backends.memcached.PyLibMCCache',
}

SUPPORTED_ONLY = 'supported_only'
ITERABLES = {tuple, list, frozenset, set}


class Settings(object):
    patched = False
    converters = {}

    CACHALOT_ENABLED = True
    CACHALOT_CACHE = 'default'
    CACHALOT_DATABASES = 'supported_only'
    CACHALOT_TIMEOUT = None
    CACHALOT_CACHE_RANDOM = False
    CACHALOT_INVALIDATE_RAW = True
    CACHALOT_ONLY_CACHABLE_TABLES = ()
    CACHALOT_UNCACHABLE_TABLES = ('django_migrations',)
    CACHALOT_QUERY_KEYGEN = 'cachalot.utils.get_query_cache_key'
    CACHALOT_TABLE_KEYGEN = 'cachalot.utils.get_table_cache_key'

    @classmethod<commit_msg>add django-prometheus wrapped database engines to the list of supported db engines (#149)<commit_after>from django.conf import settings
from django.utils.module_loading import import_string


SUPPORTED_DATABASE_ENGINES = {
    'django.db.backends.sqlite3',
    'django.db.backends.postgresql',
    'django.db.backends.mysql',
    # TODO: Remove when we drop Django 2.x support.
    'django.db.backends.postgresql_psycopg2',

    # GeoDjango
    'django.contrib.gis.db.backends.spatialite',
    'django.contrib.gis.db.backends.postgis',
    'django.contrib.gis.db.backends.mysql',

    # django-transaction-hooks
    'transaction_hooks.backends.sqlite3',
    'transaction_hooks.backends.postgis',
    # TODO: Remove when we drop Django 2.x support.
    'transaction_hooks.backends.postgresql_psycopg2',
    'transaction_hooks.backends.mysql',

    # django-prometheus wrapped engines
    'django_prometheus.db.backends.sqlite3',
    'django_prometheus.db.backends.postgresql',
    'django_prometheus.db.backends.mysql',
}

SUPPORTED_CACHE_BACKENDS = {
    'django.core.cache.backends.dummy.DummyCache',
    'django.core.cache.backends.locmem.LocMemCache',
    'django.core.cache.backends.filebased.FileBasedCache',
    'django_redis.cache.RedisCache',
    'django.core.cache.backends.memcached.MemcachedCache',
    'django.core.cache.backends.memcached.PyLibMCCache',
}

SUPPORTED_ONLY = 'supported_only'
ITERABLES = {tuple, list, frozenset, set}


class Settings(object):
    patched = False
    converters = {}

    CACHALOT_ENABLED = True
    CACHALOT_CACHE = 'default'
    CACHALOT_DATABASES = 'supported_only'
    CACHALOT_TIMEOUT = None
    CACHALOT_CACHE_RANDOM = False
    CACHALOT_INVALIDATE_RAW = True
    CACHALOT_ONLY_CACHABLE_TABLES = ()
    CACHALOT_UNCACHABLE_TABLES = ('django_migrations',)
    CACHALOT_QUERY_KEYGEN = 'cachalot.utils.get_query_cache_key'
    CACHALOT_TABLE_KEYGEN = 'cachalot.utils.get_table_cache_key'

    @classmethod
{'fraction_non_alphanumeric': 0.10676156583629894, 'fraction_numerical': 0.0043799616753353405, 'mean_word_length': 4.265129682997118, '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': '2600275', 'n_tokens_mistral': 1325, 'n_tokens_neox': 1316, 'n_words': 171}