We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 027c525 commit b1a7aecCopy full SHA for b1a7aec
1 file changed
flake8_unused_fstrings/__init__.py
@@ -32,11 +32,9 @@ class Visitor(flake8_helper.Visitor):
32
AST node visitor for identifying f-strings with no fields.
33
"""
34
35
- def check_joinedstring_has_formatted_value(self, node: ast.JoinedStr) -> bool:
36
- return any(isinstance(value, ast.FormattedValue) for value in ast.walk(node))
37
-
38
def visit_JoinedStr(self, node: ast.JoinedStr) -> None: # noqa: D102
39
- is_good = self.check_joinedstring_has_formatted_value(node)
+ is_good = any(isinstance(value, ast.FormattedValue) for value in ast.walk(node))
+
40
if not is_good:
41
self.errors.append((
42
node.lineno,
0 commit comments