summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElazrod56 <thomas.lf5629@gmail.com>2023-04-19 23:20:58 +0200
committerDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2023-04-20 07:41:43 +0200
commit4cdf9222ae7ed5a3122f633d04b8d8c144e60c1c (patch)
tree273cc29f9d806387c19dbdbdbbb6b896e32096e8
parent7f93962cf4dd5a541734f4597f8f1a24d19ece78 (diff)
downloadpylint-git-4cdf9222ae7ed5a3122f633d04b8d8c144e60c1c.tar.gz
Modified all occurences of "a f-string" to "an f-string"
-rw-r--r--doc/user_guide/checkers/features.rst6
-rw-r--r--doc/whatsnew/2/2.12/full.rst2
-rw-r--r--pylint/checkers/refactoring/recommendation_checker.py4
-rw-r--r--pylint/checkers/unsupported_version.py2
-rw-r--r--tests/functional/c/consider/consider_using_f_string.py2
-rw-r--r--tests/functional/c/consider/consider_using_f_string.txt60
-rw-r--r--tests/functional/r/regression_02/regression_8109.txt2
7 files changed, 39 insertions, 39 deletions
diff --git a/doc/user_guide/checkers/features.rst b/doc/user_guide/checkers/features.rst
index 9a7c8a4ff..a6b08381a 100644
--- a/doc/user_guide/checkers/features.rst
+++ b/doc/user_guide/checkers/features.rst
@@ -916,9 +916,9 @@ Refactoring checker Messages
comparison inside a condition to determine if a sequence is empty. Instead of
coercing the length to a boolean, either rely on the fact that empty
sequences are false or compare the length against a scalar.
-:consider-using-f-string (C0209): *Formatting a regular string which could be a f-string*
+:consider-using-f-string (C0209): *Formatting a regular string which could be an f-string*
Used when we detect a string that is being formatted with format() or % which
- could potentially be a f-string. The use of f-strings is preferred. Requires
+ could potentially be an f-string. The use of f-strings is preferred. Requires
Python 3.6 and ``py-version >= 3.6``.
:use-maxsplit-arg (C0207): *Use %s instead*
Emitted when accessing only the first or last element of str.split(). The
@@ -1308,7 +1308,7 @@ Unsupported Version checker Messages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:using-f-string-in-unsupported-version (W2601): *F-strings are not supported by all versions included in the py-version setting*
Used when the py-version set by the user is lower than 3.6 and pylint
- encounters a f-string.
+ encounters an f-string.
:using-final-decorator-in-unsupported-version (W2602): *typing.final is not supported by all versions included in the py-version setting*
Used when the py-version set by the user is lower than 3.8 and pylint
encounters a ``typing.final`` decorator.
diff --git a/doc/whatsnew/2/2.12/full.rst b/doc/whatsnew/2/2.12/full.rst
index 923dd9a25..d3f7d0922 100644
--- a/doc/whatsnew/2/2.12/full.rst
+++ b/doc/whatsnew/2/2.12/full.rst
@@ -83,7 +83,7 @@ Release date: 2021-11-24
and allows it to be checked against actual output in a test.
* Fix a crash in the ``check_elif`` extensions where an undetected if in a comprehension
- with an if statement within a f-string resulted in an out of range error. The checker no
+ with an if statement within an f-string resulted in an out of range error. The checker no
longer relies on counting if statements anymore and uses known if statements locations instead.
It should not crash on badly parsed if statements anymore.
diff --git a/pylint/checkers/refactoring/recommendation_checker.py b/pylint/checkers/refactoring/recommendation_checker.py
index 38d759214..db2e2f604 100644
--- a/pylint/checkers/refactoring/recommendation_checker.py
+++ b/pylint/checkers/refactoring/recommendation_checker.py
@@ -54,10 +54,10 @@ class RecommendationChecker(checkers.BaseChecker):
"are more efficient than ``sets``.",
),
"C0209": (
- "Formatting a regular string which could be a f-string",
+ "Formatting a regular string which could be an f-string",
"consider-using-f-string",
"Used when we detect a string that is being formatted with format() or % "
- "which could potentially be a f-string. The use of f-strings is preferred. "
+ "which could potentially be an f-string. The use of f-strings is preferred. "
"Requires Python 3.6 and ``py-version >= 3.6``.",
),
}
diff --git a/pylint/checkers/unsupported_version.py b/pylint/checkers/unsupported_version.py
index 3832b50ba..64f2630d8 100644
--- a/pylint/checkers/unsupported_version.py
+++ b/pylint/checkers/unsupported_version.py
@@ -34,7 +34,7 @@ class UnsupportedVersionChecker(BaseChecker):
"F-strings are not supported by all versions included in the py-version setting",
"using-f-string-in-unsupported-version",
"Used when the py-version set by the user is lower than 3.6 and pylint encounters "
- "a f-string.",
+ "an f-string.",
),
"W2602": (
"typing.final is not supported by all versions included in the py-version setting",
diff --git a/tests/functional/c/consider/consider_using_f_string.py b/tests/functional/c/consider/consider_using_f_string.py
index e961c44f7..e0a4831cf 100644
--- a/tests/functional/c/consider/consider_using_f_string.py
+++ b/tests/functional/c/consider/consider_using_f_string.py
@@ -1,4 +1,4 @@
-"""Test to see if a f-string would be possible and consider-using-f-string should be raised"""
+"""Test to see if an f-string would be possible and consider-using-f-string should be raised"""
# pylint: disable=unused-variable, invalid-name, missing-function-docstring, pointless-statement
# pylint: disable=expression-not-assigned, repeated-keyword, too-many-locals
diff --git a/tests/functional/c/consider/consider_using_f_string.txt b/tests/functional/c/consider/consider_using_f_string.txt
index 1d68e947b..e7785bae6 100644
--- a/tests/functional/c/consider/consider_using_f_string.txt
+++ b/tests/functional/c/consider/consider_using_f_string.txt
@@ -1,30 +1,30 @@
-consider-using-f-string:45:10:45:21:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:46:10:46:21:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:47:10:47:28:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:48:10:48:17:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:49:10:49:26:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:50:10:50:21:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:51:10:51:21:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:52:10:52:21:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:53:10:53:24:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:54:10:54:21:print_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:80:4:80:15:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:81:4:81:15:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:82:4:82:22:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:83:4:83:11:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:84:4:84:20:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:85:4:85:15:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:86:4:86:15:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:87:4:87:15:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:88:4:88:18:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:89:4:89:15:statement_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:112:8:112:19:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:113:8:113:19:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:114:8:114:26:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:115:8:115:15:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:116:8:116:24:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:117:8:117:19:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:118:8:118:19:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:119:8:119:19:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:120:8:120:22:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
-consider-using-f-string:121:8:121:19:assignment_bad:Formatting a regular string which could be a f-string:UNDEFINED
+consider-using-f-string:45:10:45:21:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:46:10:46:21:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:47:10:47:28:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:48:10:48:17:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:49:10:49:26:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:50:10:50:21:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:51:10:51:21:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:52:10:52:21:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:53:10:53:24:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:54:10:54:21:print_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:80:4:80:15:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:81:4:81:15:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:82:4:82:22:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:83:4:83:11:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:84:4:84:20:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:85:4:85:15:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:86:4:86:15:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:87:4:87:15:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:88:4:88:18:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:89:4:89:15:statement_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:112:8:112:19:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:113:8:113:19:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:114:8:114:26:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:115:8:115:15:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:116:8:116:24:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:117:8:117:19:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:118:8:118:19:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:119:8:119:19:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:120:8:120:22:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
+consider-using-f-string:121:8:121:19:assignment_bad:Formatting a regular string which could be an f-string:UNDEFINED
diff --git a/tests/functional/r/regression_02/regression_8109.txt b/tests/functional/r/regression_02/regression_8109.txt
index 161925b7d..b3166d608 100644
--- a/tests/functional/r/regression_02/regression_8109.txt
+++ b/tests/functional/r/regression_02/regression_8109.txt
@@ -1 +1 @@
-consider-using-f-string:14:24:14:34:Number.__str__:Formatting a regular string which could be a f-string:UNDEFINED
+consider-using-f-string:14:24:14:34:Number.__str__:Formatting a regular string which could be an f-string:UNDEFINED