<commit_before>import base64
import os
import thread
from sqlobject.dbconnection import DBAPI
from sqlobject import col, sqlbuilder
from sqlobject.dberrors import *

sqlite2_Binary = None

class ErrorMessage(str):
    def __new__(cls, e):
        obj = str.__new__(cls, e[0])
        obj.code = None
        obj.module = e.__module__
        obj.exception = e.__class__.__name__
        return obj

class SQLiteConnection(DBAPI):

    supportTransactions = True
    dbName = 'sqlite'
    schemes = [dbName]

    def __init__(self, filename, autoCommit=1, **kw):
        backend = kw.pop('backend', None)
        if backend is None:
            try:
                from pysqlite2 import dbapi2 as sqlite
                self.using_sqlite2 = True
            except ImportError:
                try:
                    import sqlite3 as sqlite
                    self.using_sqlite2 = True
                except ImportError:
                    import sqlite
                    self.using_sqlite2 = False
        elif backend in ('sqlite2', 'pysqlite2'):
                from pysqlite2 import dbapi2 as sqlite
                self.using_sqlite2 = True
        elif backend == 'sqlite3':
                import sqlite3 as sqlite
                self.using_sqlite2 = True
        elif backend in ('sqlite', 'sqlite1'):
                import sqlite
                self.using_sqlite2 = False
        else:
            raise ValueError('Unknown SQLite backend "%s", expected pysqlite2, sqlite3 or sqlite')
        if self.using_sqlite2:
            sqlite.encode = base64.encodestring
            sqlite.decode = base64.decodestring
        self.module = sqlite
        self.filename = filename  # full path to sqlite-db-file
        self._memory = filename == ':memory:'
        if self._memory and not self.using_sqlite2:
            raise ValueError("You must use sqlite2 to use in-memory databases")
        # connection options
        opts = {}
        if self.using_sqlite2:
            if autoCommit:
                opts["isolation_level"] = None<commit_msg>Fixed a bug - show the wrong backend.<commit_after>import base64
import os
import thread
from sqlobject.dbconnection import DBAPI
from sqlobject import col, sqlbuilder
from sqlobject.dberrors import *

sqlite2_Binary = None

class ErrorMessage(str):
    def __new__(cls, e):
        obj = str.__new__(cls, e[0])
        obj.code = None
        obj.module = e.__module__
        obj.exception = e.__class__.__name__
        return obj

class SQLiteConnection(DBAPI):

    supportTransactions = True
    dbName = 'sqlite'
    schemes = [dbName]

    def __init__(self, filename, autoCommit=1, **kw):
        backend = kw.pop('backend', None)
        if backend is None:
            try:
                from pysqlite2 import dbapi2 as sqlite
                self.using_sqlite2 = True
            except ImportError:
                try:
                    import sqlite3 as sqlite
                    self.using_sqlite2 = True
                except ImportError:
                    import sqlite
                    self.using_sqlite2 = False
        elif backend in ('sqlite2', 'pysqlite2'):
                from pysqlite2 import dbapi2 as sqlite
                self.using_sqlite2 = True
        elif backend == 'sqlite3':
                import sqlite3 as sqlite
                self.using_sqlite2 = True
        elif backend in ('sqlite', 'sqlite1'):
                import sqlite
                self.using_sqlite2 = False
        else:
            raise ValueError('Unknown SQLite backend "%s", expected pysqlite2, sqlite3 or sqlite' % backend)
        if self.using_sqlite2:
            sqlite.encode = base64.encodestring
            sqlite.decode = base64.decodestring
        self.module = sqlite
        self.filename = filename  # full path to sqlite-db-file
        self._memory = filename == ':memory:'
        if self._memory and not self.using_sqlite2:
            raise ValueError("You must use sqlite2 to use in-memory databases")
        # connection options
        opts = {}
        if self.using_sqlite2:
            if autoCommit:
                opts["isolation_level"] = None
{'fraction_non_alphanumeric': 0.07177148343734997, 'fraction_numerical': 0.014882381180988958, 'mean_word_length': 1.804172274562584, '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': '6184735', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1104, 'n_words': 330}