from taskstodo.db import JSONStorage,DB
from .settings import DB_PATH

class DBFactory:
    _instance = None

    def __init__(self):
        raise RuntimeError("Call instance() instead")

    @classmethod
    def instance(cls):
        if cls._instance is None:
            print("Creating a database instance")
            storage = JSONStorage(DB_PATH)
            cls._instance = DB(storage)

        return cls._instance 
d107907656f785911973bacd1805e79f17483316
<mask token>


class DBFactory:
    <mask token>

    def __init__(self):
        raise RuntimeError('Call instance() instead')
    <mask token>

<mask token>


class DBFactory:
    <mask token>

    def __init__(self):
        raise RuntimeError('Call instance() instead')

    @classmethod
    def instance(cls):
        if cls._instance is None:
            print('Creating a database instance')
            storage = JSONStorage(DB_PATH)
            cls._instance = DB(storage)
        return cls._instance

<mask token>


class DBFactory:
    _instance = None

    def __init__(self):
        raise RuntimeError('Call instance() instead')

    @classmethod
    def instance(cls):
        if cls._instance is None:
            print('Creating a database instance')
            storage = JSONStorage(DB_PATH)
            cls._instance = DB(storage)
        return cls._instance

from taskstodo.db import JSONStorage, DB
from .settings import DB_PATH


class DBFactory:
    _instance = None

    def __init__(self):
        raise RuntimeError('Call instance() instead')

    @classmethod
    def instance(cls):
        if cls._instance is None:
            print('Creating a database instance')
            storage = JSONStorage(DB_PATH)
            cls._instance = DB(storage)
        return cls._instance

from taskstodo.db import JSONStorage,DB
from .settings import DB_PATH

class DBFactory:
    _instance = None

    def __init__(self):
        raise RuntimeError("Call instance() instead")

    @classmethod
    def instance(cls):
        if cls._instance is None:
            print("Creating a database instance")
            storage = JSONStorage(DB_PATH)
            cls._instance = DB(storage)

        return cls._instance 