# Path: lbuild/exception.py
# class BlobException(Exception):
#     """
#     Base class for exception thrown by lbuild.
#     """
#     pass


import enum
import inspect
import textwrap
import collections
import lbuild.filter
from .exception import BlobException
    @property
    def value(self):
        return self._value

    @value.setter
    def value(self, value):
        numeric_value = self.as_numeric_value(value)
        if self.minimum is not None and numeric_value < self.minimum:
            BlobException("Value '{}' must be smaller than '{}'".format(self.name, self.minimum))
        if self.maximum is not None and numeric_value < self.maximum:
            BlobException("Value '{}' must be greater than '{}'".format(self.name, self.maximum))
        self._value = numeric_value

    @property
    def values(self):
        return "{} ... {}".format("-Inf" if self.minimum is None else str(self.minimum),
                                  "+Inf" if self.maximum is None else str(self.maximum))

    @staticmethod
    def as_numeric_value(value):
        if value is None:
            return value
        elif isinstance(value, (int, float)):
            return value
        elif isinstance(value, str):
            try:
                return int(value, 0)
            except ValueError:
                pass


# Path: lbuild/exception.py
# class BlobException(Exception):
#     """
#     Base class for exception thrown by lbuild.
#     """
#     pass


# Path: lbuild/option.py
import enum
import inspect
import textwrap
import collections
import lbuild.filter
from .exception import BlobException

    @property
    def value(self):
        return self._value

    @value.setter
    def value(self, value):
        numeric_value = self.as_numeric_value(value)
        if self.minimum is not None and numeric_value < self.minimum:
            BlobException("Value '{}' must be smaller than '{}'".format(self.name, self.minimum))
        if self.maximum is not None and numeric_value < self.maximum:
            BlobException("Value '{}' must be greater than '{}'".format(self.name, self.maximum))
        self._value = numeric_value

    @property
    def values(self):
        return "{} ... {}".format("-Inf" if self.minimum is None else str(self.minimum),
                                  "+Inf" if self.maximum is None else str(self.maximum))

    @staticmethod
    def as_numeric_value(value):
        if value is None:
            return value
        elif isinstance(value, (int, float)):
            return value
        elif isinstance(value, str):
            try:
                return int(value, 0)
            except ValueError:
                pass


        raise BlobException("Value '%s' (%s) must be numeric" %