diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-21 13:27:11 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-21 15:36:16 +0100 |
commit | 5bed07eba999130b6551acc7c43192d6a8eada43 (patch) | |
tree | 09e3a11503bd074363556e8a5fd33fc0e8db7fc4 /pylint/checkers/spelling.py | |
parent | a1e553d3bb07c56ca99c31279f9af104bede0a32 (diff) | |
download | pylint-git-5bed07eba999130b6551acc7c43192d6a8eada43.tar.gz |
Move from % string formatting syntax to f-string or .format()
Diffstat (limited to 'pylint/checkers/spelling.py')
-rw-r--r-- | pylint/checkers/spelling.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py index 4abf6fa97..587807723 100644 --- a/pylint/checkers/spelling.py +++ b/pylint/checkers/spelling.py @@ -66,7 +66,7 @@ if enchant is not None: br = enchant.Broker() dicts = br.list_dicts() dict_choices = [""] + [d[0] for d in dicts] - dicts = ["%s (%s)" % (d[0], d[1].name) for d in dicts] + dicts = ["{} ({})".format(d[0], d[1].name) for d in dicts] dicts = ", ".join(dicts) instr = "" else: @@ -358,7 +358,7 @@ class SpellingChecker(BaseTokenChecker): col += 1 indicator = (" " * col) + ("^" * len(word)) all_suggestion = "' or '".join(suggestions) - args = (word, original_line, indicator, "'{}'".format(all_suggestion)) + args = (word, original_line, indicator, f"'{all_suggestion}'") self.add_message(msgid, line=line_num, args=args) def process_tokens(self, tokens): |