Fix some pep8 issues

W293:
 pycodestyle-3.6 num2words | grep W293
 num2words/lang_EN_EUR.py:19:1: W293 blank line contains whitespace
 num2words/lang_EN_EUR.py:43:1: W293 blank line contains whitespace
 num2words/lang_EN_IN.py:19:1: W293 blank line contains whitespace
 num2words/lang_EU.py:28:1: W293 blank line contains whitespace
 num2words/lang_RU.py:236:1: W293 blank line contains whitespace
 num2words/lang_UK.py:218:1: W293 blank line contains whitespace
 num2words/lang_UK.py:238:1: W293 blank line contains whitespace
 num2words/lang_UK.py:248:1: W293 blank line contains whitespace
 num2words/orderedmapping.py:22:1: W293 blank line contains whitespace

Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
This commit is contained in:
William Moreno Reyes
2017-10-23 14:10:29 -06:00
parent e15e7486c4
commit 34de8f7f87
6 changed files with 9 additions and 9 deletions

View File

@@ -16,7 +16,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from .lang_EN import Num2Word_EN from .lang_EN import Num2Word_EN
class Num2Word_EN_EUR(Num2Word_EN): class Num2Word_EN_EUR(Num2Word_EN):
def to_currency(self, val, longval=True, cents=True, jointxt="and"): def to_currency(self, val, longval=True, cents=True, jointxt="and"):
return self.to_splitnum(val, hightxt="euro/s", lowtxt="cents", return self.to_splitnum(val, hightxt="euro/s", lowtxt="cents",
@@ -40,7 +40,7 @@ def main():
for val in [1,120,1000,1120,1800, 1976,2000,2010,2099,2171]: for val in [1,120,1000,1120,1800, 1976,2000,2010,2099,2171]:
print val, "is", n2w.to_currency(val) print val, "is", n2w.to_currency(val)
print val, "is", n2w.to_year(val) print val, "is", n2w.to_year(val)
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View File

@@ -16,7 +16,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from .lang_EN import Num2Word_EN from .lang_EN import Num2Word_EN
class Num2Word_EN_IN(Num2Word_EN): class Num2Word_EN_IN(Num2Word_EN):
def set_high_numwords(self, high): def set_high_numwords(self, high):
self.cards[10**7] = "crore" self.cards[10**7] = "crore"

View File

@@ -25,7 +25,7 @@ class Num2Word_EU(Num2Word_Base):
self.cards[10**n] = word + "illiard" self.cards[10**n] = word + "illiard"
self.cards[10**(n-3)] = word + "illion" self.cards[10**(n-3)] = word + "illion"
def base_setup(self): def base_setup(self):
lows = ["non","oct","sept","sext","quint","quadr","tr","b","m"] lows = ["non","oct","sept","sext","quint","quadr","tr","b","m"]
units = ["", "un", "duo", "tre", "quattuor", "quin", "sex", "sept", units = ["", "un", "duo", "tre", "quattuor", "quin", "sex", "sept",

View File

@@ -233,7 +233,7 @@ def int2word(n, feminine=False):
if n3 > 0: if n3 > 0:
words.append(HUNDREDS[n3][0]) words.append(HUNDREDS[n3][0])
if n2 > 1: if n2 > 1:
words.append(TWENTIES[n2][0]) words.append(TWENTIES[n2][0])

View File

@@ -215,7 +215,7 @@ def pluralize(n, forms):
form = 2 form = 2
else: else:
form = 2 form = 2
return forms[form] return forms[form]
@@ -235,7 +235,7 @@ def int2word(n, feminine=True):
if n3 > 0: if n3 > 0:
words.append(HUNDREDS[n3][0]) words.append(HUNDREDS[n3][0])
if n2 > 1: if n2 > 1:
words.append(TWENTIES[n2][0]) words.append(TWENTIES[n2][0])
@@ -245,7 +245,7 @@ def int2word(n, feminine=True):
elif n1 > 0: elif n1 > 0:
ones = ONES_FEMININE if i == 1 or feminine and i == 0 else ONES ones = ONES_FEMININE if i == 1 or feminine and i == 0 else ONES
words.append(ones[n1][0]) words.append(ones[n1][0])
if i > 0 and ((n1+n2+n3) > 0): if i > 0 and ((n1+n2+n3) > 0):
words.append(pluralize(x, THOUSANDS[i])) words.append(pluralize(x, THOUSANDS[i]))

View File

@@ -19,7 +19,7 @@ class OrderedMapping(dict):
self.order = [] self.order = []
for key, val in pairs: for key, val in pairs:
self[key] = val self[key] = val
def __setitem__(self, key, val): def __setitem__(self, key, val):
if key not in self: if key not in self:
self.order.append(key) self.order.append(key)