Skip to content

Commit

Permalink
fixed KeyError: 'test' in show_unused_variables.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Mar 29, 2018
1 parent 5ae5e3a commit cdb130e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/listeners/show_unused_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def on_modified_async_with_thread(self, recheck=True):
items += [item["alternate"]]
if isinstance(item["test"],dict) and "name" in item["test"] and item["test"]["type"] == "Identifier":
item = item["test"]
if isinstance(item["test"],dict) and item["test"]["type"] == "UnaryExpression" and "argument" in item["test"] and "name" in item["test"]["argument"] and item["test"]["argument"]["type"] == "Identifier":
elif isinstance(item["test"],dict) and item["test"]["type"] == "UnaryExpression" and "argument" in item["test"] and "name" in item["test"]["argument"] and item["test"]["argument"]["type"] == "Identifier":
item = item["test"]["argument"]
else:
continue
Expand Down

0 comments on commit cdb130e

Please sign in to comment.