Skip to content

Commit 8e7e0f8

Browse files
committed
Merge pull request #19 from RitwikGupta/patch-2
PEP8 String format changes
2 parents 0de5865 + 8dae9e2 commit 8e7e0f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pattern/text/en/inflect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def article(word, function=INDEFINITE):
101101

102102
def referenced(word, article=INDEFINITE):
103103
"""Returns a string with the article + the word."""
104-
return "%s %s" % (_article(word, article), word)
104+
return "{0} {1}".format(_article(word, article), word)
105105

106106
# print referenced("hour")
107107
# print referenced("FBI")
@@ -798,7 +798,7 @@ def grade(adjective, suffix=COMPARATIVE):
798798
return grade_irregular[adjective][suffix != COMPARATIVE]
799799
elif adjective in grade_uninflected:
800800
# A number of adjectives don't inflect at all.
801-
return "%s %s" % (suffix == COMPARATIVE and "more" or "most", adjective)
801+
return "{0} {1}".format(suffix == COMPARATIVE and "more" or "most", adjective)
802802
elif n <= 2 and adjective.endswith("e"):
803803
# With one syllable and ending with an e: larger, wiser.
804804
suffix = suffix.lstrip("e")
@@ -819,7 +819,7 @@ def grade(adjective, suffix=COMPARATIVE):
819819
pass
820820
else:
821821
# With three or more syllables: more generous, more important.
822-
return "%s %s" % (suffix == COMPARATIVE and "more" or "most", adjective)
822+
return "{0} {1}".format(suffix == COMPARATIVE and "more" or "most", adjective)
823823
return adjective + suffix
824824

825825

0 commit comments

Comments
 (0)