def convert(self, value, view):
        if isinstance(value, NUMERIC_TYPES):
            return value
        else:
            self.fail(
                u'must be numeric, not {0}'.format(type(value).__name__),
                view,
                True
            )
Check that the value is an int or a float.
dataset/ETHPy150Open beetbox/beets/beets/util/confit.py/Number.convert