Skip to content

Commit

Permalink
Update postprocess.py
Browse files Browse the repository at this point in the history
Convert to number if result is a string
  • Loading branch information
DrRSatzteil authored Apr 8, 2024
1 parent 4ce4e92 commit 8431768
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mayanmindee/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def replace(result, parsed_doc, *args):
def format(result, parsed_doc, *args):
if result:
try:
if isinstance(result, str):
result = float(result)
return args[0].format(result)
except:
return result
Expand Down

0 comments on commit 8431768

Please sign in to comment.