fuzzyfields/numbers.py
def _num_converter(self, value: Any) -> Union[float, None]:
        """Convert string, int, or other to float
        """
        try:
            if isinstance(value, str) and value[-1] == '%':
                value = value[:-1].strip()
                if value in NA_VALUES:
                    return None
                return float(value) / 100
            return float(value)
        except TypeError:
            raise FieldTypeError(self.name, value, "percentage")
        except ValueError:
            raise MalformedFieldError(self.name, value, "percentage")
Convert string, int, or other to float
        
Convert string, int, or other to float
Convert string int or other to float
def _num_converter(self, value: Any) -> Union[float, None]:
        try:
            if isinstance(value, str) and value[-1] == '%':
                value = value[:-1].strip()
                if value in NA_VALUES:
                    return None
                return float(value) / 100
            return float(value)
        except TypeError:
            raise FieldTypeError(self.name, value, "percentage")
        except ValueError:
            raise MalformedFieldError(self.name, value, "percentage")
def _num_converter ( self , value : Any ) -> Union [ float , None ] : try : if isinstance ( value , str ) and value [ - 1 ] == '%' : value = value [ : - 1 ] . strip ( ) if value in NA_VALUES : return None return float ( value ) / 100 return float ( value ) except TypeError : raise FieldTypeError ( self . name , value , "percentage" ) except ValueError : raise MalformedFieldError ( self . name , value , "percentage" )
Convert string, int, or other to float
Convert string int or other to float
"""Convert string, int, or other to float
        """
self
value
Any