From ca2651ad0f71632a0681805f83fedb63cb35769e Mon Sep 17 00:00:00 2001 From: hamidreza kalbasi Date: Sun, 24 Jan 2021 10:30:06 +0330 Subject: [PATCH] remove unneccery if --- num2words/lang_FA.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/num2words/lang_FA.py b/num2words/lang_FA.py index ca7004c..9c5ff74 100644 --- a/num2words/lang_FA.py +++ b/num2words/lang_FA.py @@ -90,14 +90,7 @@ class Num2Word_FA(object): self.precision = abs(Decimal(str(value)).as_tuple().exponent) post = abs(value - pre) * 10**self.precision - if abs(round(post) - post) < 0.01: - # We generally floor all values beyond our precision (rather than - # rounding), but in cases where we have something like 1.239999999, - # which is probably due to python's handling of floats, we actually - # want to consider it as 1.24 instead of 1.23 - post = int(round(post)) - else: - post = int(math.floor(post)) + post = int(math.floor(post)) return pre, post, self.precision