# Path: aredis/utils.py
# def dict_merge(*dicts):
#     merged = {}
#     for d in dicts:
#         merged.update(d)
#     return merged
# 
# def nativestr(x):
#     return x if isinstance(x, str) else x.decode('utf-8', 'replace')
# 
# def list_keys_to_dict(key_list, callback):
#     return dict.fromkeys(key_list, callback)
# 
# class NodeFlag:
#     BLOCKED = 'blocked'
#     ALL_NODES = 'all-nodes'
#     ALL_MASTERS = 'all-masters'
#     RANDOM = 'random'
#     SLOT_ID = 'slot-id'
# 
# def bool_ok(response):
#     return nativestr(response) == 'OK'


from aredis.utils import (dict_merge, nativestr,
                          list_keys_to_dict,
                          NodeFlag, bool_ok)
        from aredis.scripting import Script


class ScriptingCommandMixin:

    RESPONSE_CALLBACKS = {
        'SCRIPT EXISTS': lambda r: list(map(bool, r)),
        'SCRIPT FLUSH': bool_ok,

# Path: aredis/utils.py
# def dict_merge(*dicts):
#     merged = {}
#     for d in dicts:
#         merged.update(d)
#     return merged
# 
# def nativestr(x):
#     return x if isinstance(x, str) else x.decode('utf-8', 'replace')
# 
# def list_keys_to_dict(key_list, callback):
#     return dict.fromkeys(key_list, callback)
# 
# class NodeFlag:
#     BLOCKED = 'blocked'
#     ALL_NODES = 'all-nodes'
#     ALL_MASTERS = 'all-masters'
#     RANDOM = 'random'
#     SLOT_ID = 'slot-id'
# 
# def bool_ok(response):
#     return nativestr(response) == 'OK'


# Path: aredis/commands/scripting.py
from aredis.utils import (dict_merge, nativestr,
                          list_keys_to_dict,
                          NodeFlag, bool_ok)
        from aredis.scripting import Script



class ScriptingCommandMixin:

    RESPONSE_CALLBACKS = {
        'SCRIPT EXISTS': lambda r: list(map(bool, r)),
        'SCRIPT FLUSH': bool_ok,

        'SCRIPT KILL': bool_ok,