mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
dont round up int conversions and fix tests
This commit is contained in:
@ -100,7 +100,7 @@ def convert_to_int(value):
|
||||
return int(re.sub(r'[^0-9\-\.]', '', value))
|
||||
except ValueError:
|
||||
try:
|
||||
return round(convert_to_float(value))
|
||||
return int(convert_to_float(value))
|
||||
except (ValueError, TypeError):
|
||||
return None
|
||||
|
||||
|
Reference in New Issue
Block a user