Skip to content

Commit

Permalink
Fix style.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed May 24, 2020
1 parent 2f98af4 commit 63cdaab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vulture/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,12 +401,13 @@ def _add_aliases(self, node):

def _handle_conditional_node(self, node, name):
if utils.condition_is_always_false(node.test):
last_node = node.body if isinstance(node, ast.IfExp) else node.body[-1]
self._define(
self.unreachable_code,
name,
node,
last_node=last_node,
last_node=node.body
if isinstance(node, ast.IfExp)
else node.body[-1],
message="unsatisfiable '{name}' condition".format(**locals()),
confidence=100,
)
Expand Down

0 comments on commit 63cdaab

Please sign in to comment.