# Path: auxlib/decorators.py
# class classproperty(object):  # pylint: disable=C0103
#     # from celery.five
# 
#     def __init__(self, getter=None, setter=None):
#         if getter is not None and not isinstance(getter, classmethod):
#             getter = classmethod(getter)
#         if setter is not None and not isinstance(setter, classmethod):
#             setter = classmethod(setter)
#         self.__get = getter
#         self.__set = setter
# 
#         info = getter.__get__(object)  # just need the info attrs.
#         self.__doc__ = info.__doc__
#         self.__name__ = info.__name__
#         self.__module__ = info.__module__
# 
#     def __get__(self, obj, type_=None):
#         if obj and type_ is None:
#             type_ = obj.__class__
#         return self.__get.__get__(obj, type_)()
# 
#     def __set__(self, obj, value):
#         if obj is None:
#             return self
#         return self.__set.__get__(obj)(value)
# 
#     def setter(self, setter):
#         return self.__class__(self.__get, setter)


from logging import getLogger
from unittest import TestCase
from auxlib.decorators import classproperty
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function


log = getLogger(__name__)


class AllTheAnswers(object):
    _x = 42
    _y = 43

    def __init__(self, x, y):
        self._x = x
        self._y = y

    @classproperty
    def x(cls):
        return cls._x

    @x.setter
    def x(cls, val):
        cls._x = val


# Path: auxlib/decorators.py
# class classproperty(object):  # pylint: disable=C0103
#     # from celery.five
# 
#     def __init__(self, getter=None, setter=None):
#         if getter is not None and not isinstance(getter, classmethod):
#             getter = classmethod(getter)
#         if setter is not None and not isinstance(setter, classmethod):
#             setter = classmethod(setter)
#         self.__get = getter
#         self.__set = setter
# 
#         info = getter.__get__(object)  # just need the info attrs.
#         self.__doc__ = info.__doc__
#         self.__name__ = info.__name__
#         self.__module__ = info.__module__
# 
#     def __get__(self, obj, type_=None):
#         if obj and type_ is None:
#             type_ = obj.__class__
#         return self.__get.__get__(obj, type_)()
# 
#     def __set__(self, obj, value):
#         if obj is None:
#             return self
#         return self.__set.__get__(obj)(value)
# 
#     def setter(self, setter):
#         return self.__class__(self.__get, setter)


# Path: tests/test_decorators.py
from logging import getLogger
from unittest import TestCase
from auxlib.decorators import classproperty

# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function


log = getLogger(__name__)


class AllTheAnswers(object):
    _x = 42
    _y = 43

    def __init__(self, x, y):
        self._x = x
        self._y = y

    @classproperty
    def x(cls):
        return cls._x

    @x.setter
    def x(cls, val):
        cls._x = val


    @classproperty