Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
madanalogy committed Nov 13, 2023
1 parent d626cd1 commit b0568ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ async def run_add(chat_id, text):
amount = core[1].strip()
if not is_valid_amount(amount):
return constants.ERROR_PRECONDITION
amount = float(amount)
details = {
"name": core[0].strip().lower(),
"amount": float(amount),
"amount": amount,
"payer": core[2].strip().lower(),
}

Expand All @@ -36,8 +37,9 @@ async def run_add(chat_id, text):
owed = parsed[1].strip()
if not is_valid_amount(owed):
return constants.ERROR_PRECONDITION
owed_amounts[parsed[0].strip()] = float(owed)
running_sum += float(owed)
owed = float(owed)
owed_amounts[parsed[0].strip()] = owed
running_sum += owed
else:
owed_amounts[parsed[0].strip()] = 0
split_count += 1
Expand Down

0 comments on commit b0568ab

Please sign in to comment.