Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
costaparas committed Aug 23, 2023
1 parent ebd7d8b commit f45f89f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bandit/plugins/injection_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ def _evaluate_ast(node):
out = utils.concat_string(node, node._bandit_parent)
wrapper = out[0]._bandit_parent
statement = out[1]
elif (
isinstance(node._bandit_parent, ast.Attribute)
and node._bandit_parent.attr in ("format", "replace")
):
elif isinstance(
node._bandit_parent, ast.Attribute
) and node._bandit_parent.attr in ("format", "replace"):
statement = node.s
# Hierarchy for "".format() is Wrapper -> Call -> Attribute -> Str
wrapper = node._bandit_parent._bandit_parent._bandit_parent
Expand Down

0 comments on commit f45f89f

Please sign in to comment.