# Path: therapist/collection.py
# class Collection(object):
#     """A generic iterable set of objects."""
# 
#     class Meta:
#         pass
# 
#     def __init__(self, objects=None):
#         self._objects = []
# 
#         if objects:
#             for obj in objects:
#                 self.append(obj)
# 
#     def __iter__(self):
#         return iter(self._objects)
# 
#     def __getitem__(self, item):
#         return self._objects[item]
# 
#     def __str__(self):  # pragma: no cover
#         return str(self._objects)
# 
#     def __repr__(self):  # pragma: no cover
#         return "<{}>".format(self.__class__.__name__)
# 
#     def __bool__(self):
#         return bool(self._objects)
# 
#     __nonzero__ = __bool__
# 
#     @property
#     def objects(self):
#         return self._objects
# 
#     def append(self, v):
#         object_class = getattr(self.Meta, "object_class", object)
# 
#         if not isinstance(v, object_class):
#             raise TypeError("Expected an instance of `{}`.".format(object_class.__name__))
# 
#         self._objects.append(v)
# 
# Path: therapist/exc.py
# class Error(Exception):
#     def __init__(self, message=None, *args, **kwargs):
#         self.message = message
#         super(Error, self).__init__(*args, **kwargs)


from therapist.collection import Collection
from therapist.exc import Error
    @property
    def flags(self):
        return self._flags

    @flags.setter
    def flags(self, value):
        if value is None:
            self._flags = set()
        elif isinstance(value, set):
            self._flags = value
        elif isinstance(value, list):
            self._flags = set(value)
        else:
            self._flags = set([value])

    def extend(self, apply):
        options = {}
        options.update(self.options)
        options.update(apply.options)

        flags = self.flags
        flags = flags.union(apply.flags)

        return Shortcut(apply.name, extends=self.extends, options=options, flags=flags)


class ShortcutCollection(Collection):
    class Meta:
        object_class = Shortcut


# Path: therapist/collection.py
# class Collection(object):
#     """A generic iterable set of objects."""
# 
#     class Meta:
#         pass
# 
#     def __init__(self, objects=None):
#         self._objects = []
# 
#         if objects:
#             for obj in objects:
#                 self.append(obj)
# 
#     def __iter__(self):
#         return iter(self._objects)
# 
#     def __getitem__(self, item):
#         return self._objects[item]
# 
#     def __str__(self):  # pragma: no cover
#         return str(self._objects)
# 
#     def __repr__(self):  # pragma: no cover
#         return "<{}>".format(self.__class__.__name__)
# 
#     def __bool__(self):
#         return bool(self._objects)
# 
#     __nonzero__ = __bool__
# 
#     @property
#     def objects(self):
#         return self._objects
# 
#     def append(self, v):
#         object_class = getattr(self.Meta, "object_class", object)
# 
#         if not isinstance(v, object_class):
#             raise TypeError("Expected an instance of `{}`.".format(object_class.__name__))
# 
#         self._objects.append(v)
# 
# Path: therapist/exc.py
# class Error(Exception):
#     def __init__(self, message=None, *args, **kwargs):
#         self.message = message
#         super(Error, self).__init__(*args, **kwargs)


# Path: therapist/runner/shortcut.py
from therapist.collection import Collection
from therapist.exc import Error

    @property
    def flags(self):
        return self._flags

    @flags.setter
    def flags(self, value):
        if value is None:
            self._flags = set()
        elif isinstance(value, set):
            self._flags = value
        elif isinstance(value, list):
            self._flags = set(value)
        else:
            self._flags = set([value])

    def extend(self, apply):
        options = {}
        options.update(self.options)
        options.update(apply.options)

        flags = self.flags
        flags = flags.union(apply.flags)

        return Shortcut(apply.name, extends=self.extends, options=options, flags=flags)


class ShortcutCollection(Collection):
    class Meta:
        object_class = Shortcut


    class DoesNotExist(Error):