Skip to content

Commit

Permalink
Merge pull request #19 from RitwikGupta/patch-2
Browse files Browse the repository at this point in the history
PEP8 String format changes
  • Loading branch information
hayd committed Aug 19, 2015
2 parents 0de5865 + 8dae9e2 commit 8e7e0f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pattern/text/en/inflect.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def article(word, function=INDEFINITE):

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

# print referenced("hour")
# print referenced("FBI")
Expand Down Expand Up @@ -798,7 +798,7 @@ def grade(adjective, suffix=COMPARATIVE):
return grade_irregular[adjective][suffix != COMPARATIVE]
elif adjective in grade_uninflected:
# A number of adjectives don't inflect at all.
return "%s %s" % (suffix == COMPARATIVE and "more" or "most", adjective)
return "{0} {1}".format(suffix == COMPARATIVE and "more" or "most", adjective)
elif n <= 2 and adjective.endswith("e"):
# With one syllable and ending with an e: larger, wiser.
suffix = suffix.lstrip("e")
Expand All @@ -819,7 +819,7 @@ def grade(adjective, suffix=COMPARATIVE):
pass
else:
# With three or more syllables: more generous, more important.
return "%s %s" % (suffix == COMPARATIVE and "more" or "most", adjective)
return "{0} {1}".format(suffix == COMPARATIVE and "more" or "most", adjective)
return adjective + suffix


Expand Down

0 comments on commit 8e7e0f8

Please sign in to comment.