Skip to content

Commit

Permalink
Modified all occurences of "a f-string" to "an f-string"
Browse files Browse the repository at this point in the history
  • Loading branch information
Elazrod56 authored and DanielNoord committed Apr 20, 2023
1 parent 7f93962 commit 4cdf922
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 39 deletions.
6 changes: 3 additions & 3 deletions doc/user_guide/checkers/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion doc/whatsnew/2/2.12/full.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions pylint/checkers/refactoring/recommendation_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``.",
),
}
Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/unsupported_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/c/consider/consider_using_f_string.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
60 changes: 30 additions & 30 deletions tests/functional/c/consider/consider_using_f_string.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/functional/r/regression_02/regression_8109.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4cdf922

Please sign in to comment.