1
0
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:
Kelly Brazil
2021-04-18 17:21:08 -07:00
parent 27a196c938
commit 7eddf41c5f
11 changed files with 96 additions and 9 deletions

View File

@ -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