From 8dae9e21534f625aeded9bc50c08d11cfc62dd18 Mon Sep 17 00:00:00 2001 From: Ritwik Gupta Date: Wed, 19 Aug 2015 13:35:12 -0400 Subject: [PATCH] PEP8 String format changes Referring to https://github.com/clips/pattern/pull/117 --- pattern/text/en/inflect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pattern/text/en/inflect.py b/pattern/text/en/inflect.py index a8194a95..6999b06d 100644 --- a/pattern/text/en/inflect.py +++ b/pattern/text/en/inflect.py @@ -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") @@ -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") @@ -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