Skip to content

Commit

Permalink
Fixed flask8 pylint errors to correspond with styling requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
elenae098 committed Dec 9, 2024
1 parent 797d8d9 commit 6eb7873
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions num2words/lang_ES.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def set_high_numwords(self, high):
max = 3 + 3 * len(high)
for word, n in zip(high, range(max, 3, -3)):
if n % 6 == 0:
self.cards[10 ** n] = word + self.MEGA_SUFFIX
self.cards[10 ** n] = word + self.MEGA_SUFFIX
else:
self.cards[10 ** n] = "mil " + word + self.MEGA_SUFFIX

Expand Down Expand Up @@ -294,11 +294,14 @@ def merge(self, curr, next):
if nnum < cnum:
if cnum == 1000000000 and nnum > 1:
ctext = ctext[:-3] + "lones"
elif cnum < 100:
elif cnum < 100:
return "%s y %s" % (ctext, ntext), cnum + nnum
return "%s %s" % (ctext, ntext), cnum + nnum

if (nnum % 1000000 == 0 and cnum > 1) or (nnum >= 1000000000 and "mil " in ntext):
is_mil_multiple = nnum % 1000000 == 0 and cnum > 1
contains_mil = nnum >= 1000000000 and "mil " in ntext

if is_mil_multiple or contains_mil:
ntext = ntext[:-3] + "lones"

if nnum == 100:
Expand Down
4 changes: 2 additions & 2 deletions num2words/lang_PT.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def set_high_numwords(self, high):
max = 3 + 3 * len(high)
for word, n in zip(high, range(max, 3, -3)):
if n % 6 == 0:
self.cards[10 ** n] = word + self.MEGA_SUFFIX
self.cards[10 ** n] = word + self.MEGA_SUFFIX
else:
self.cards[10 ** n] = "mil " + word + self.MEGA_SUFFIX

def setup(self):
super(Num2Word_PT, self).setup()
lows = ["quatr", "quatr", "tr", "tr", "b", "b", "m", "m"]
Expand Down

0 comments on commit 6eb7873

Please sign in to comment.