summaryrefslogtreecommitdiff
path: root/tests/functional/r
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-08-30 07:57:05 +0200
committerGitHub <noreply@github.com>2021-08-30 07:57:05 +0200
commit66ffcbc4c59e41327be1a2b5ef65727bf0314aa9 (patch)
tree5b1f37a0ffadc2888f851337b36f75717ebf4c72 /tests/functional/r
parent1a19421058dcc04446f8b91a825ed1078959d87a (diff)
downloadpylint-git-66ffcbc4c59e41327be1a2b5ef65727bf0314aa9.tar.gz
Add ``Consider-using-f-string`` checker (#4796)
* Add ``consider-using-f-string`` checker This adds a checker for normal strings which are formatted with ``.format()`` or '%'. The message is a convention to nudge users towards using f-strings. This closes #3592 * Update pylint code to use f-strings After adding `consider-using-f-strings` the codebase showed numerous cases of formatting which could be f-strings. This commit changes most of these to become f-strings, or adds ignores. * Apply suggestions from code review Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/functional/r')
-rw-r--r--tests/functional/r/raise/raising_format_tuple.py2
-rw-r--r--tests/functional/r/renamed_import_logging_not_lazy.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/r/raise/raising_format_tuple.py b/tests/functional/r/raise/raising_format_tuple.py
index 12e763d47..268d834f4 100644
--- a/tests/functional/r/raise/raising_format_tuple.py
+++ b/tests/functional/r/raise/raising_format_tuple.py
@@ -4,7 +4,7 @@ contains a percent sign, thus suggesting a % string formatting was intended
instead. The same holds for a string containing {...} suggesting str.format()
was intended.
'''
-# pylint: disable=redundant-u-string-prefix
+# pylint: disable=redundant-u-string-prefix, consider-using-f-string
def bad_percent(arg):
'''Raising a percent-formatted string and an argument'''
diff --git a/tests/functional/r/renamed_import_logging_not_lazy.py b/tests/functional/r/renamed_import_logging_not_lazy.py
index e4ca1c338..5eb23bf95 100644
--- a/tests/functional/r/renamed_import_logging_not_lazy.py
+++ b/tests/functional/r/renamed_import_logging_not_lazy.py
@@ -1,4 +1,4 @@
-# pylint: disable=missing-docstring, too-few-public-methods, no-member
+# pylint: disable=missing-docstring, too-few-public-methods, no-member, consider-using-f-string
from __future__ import absolute_import
# Muck up the names in an effort to confuse...