Skip to content

Commit b1a7aec

Browse files
committed
Merge functions.
1 parent 027c525 commit b1a7aec

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

flake8_unused_fstrings/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ class Visitor(flake8_helper.Visitor):
3232
AST node visitor for identifying f-strings with no fields.
3333
"""
3434

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-
3835
def visit_JoinedStr(self, node: ast.JoinedStr) -> None: # noqa: D102
39-
is_good = self.check_joinedstring_has_formatted_value(node)
36+
is_good = any(isinstance(value, ast.FormattedValue) for value in ast.walk(node))
37+
4038
if not is_good:
4139
self.errors.append((
4240
node.lineno,

0 commit comments

Comments
 (0)