aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-07-22 17:05:11 +0300
committerBonfaceKilz2020-07-24 03:47:44 +0300
commit073e8c9813505fc00372b2ec21f3e4a87b5be9aa (patch)
tree1cdba9b4c4dc2467e46adfd17a6585e28e9ae5ef
parentaed1b7f12f653694c22ab389a403120e143a0669 (diff)
downloadgenenetwork2-073e8c9813505fc00372b2ec21f3e4a87b5be9aa.tar.gz
Apply autopep-8
* wqflask/utility/formatting.py: apply it
-rw-r--r--wqflask/utility/formatting.py30
1 files changed, 14 insertions, 16 deletions
diff --git a/wqflask/utility/formatting.py b/wqflask/utility/formatting.py
index 1c0269e9..1da3e9b7 100644
--- a/wqflask/utility/formatting.py
+++ b/wqflask/utility/formatting.py
@@ -28,22 +28,20 @@ def numify(number, singular=None, plural=None):
'12,334 hippopotami'
"""
- num_repr = {0 : "zero",
- 1 : "one",
- 2 : "two",
- 3 : "three",
- 4 : "four",
- 5 : "five",
- 6 : "six",
- 7 : "seven",
- 8 : "eight",
- 9 : "nine",
- 10 : "ten",
- 11 : "eleven",
- 12 : "twelve"}
-
- #Below line commented out cause doesn't work in Python 2.4
- #assert all((singular, plural)) or not any((singular, plural)), "Need to pass two words or none"
+ num_repr = {0: "zero",
+ 1: "one",
+ 2: "two",
+ 3: "three",
+ 4: "four",
+ 5: "five",
+ 6: "six",
+ 7: "seven",
+ 8: "eight",
+ 9: "nine",
+ 10: "ten",
+ 11: "eleven",
+ 12: "twelve"}
+
if number == 1:
word = singular
else: