Skip to content

Commit cdb130e

Browse files
fixed KeyError: 'test' in show_unused_variables.py
1 parent 5ae5e3a commit cdb130e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/listeners/show_unused_variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def on_modified_async_with_thread(self, recheck=True):
187187
items += [item["alternate"]]
188188
if isinstance(item["test"],dict) and "name" in item["test"] and item["test"]["type"] == "Identifier":
189189
item = item["test"]
190-
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":
190+
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":
191191
item = item["test"]["argument"]
192192
else:
193193
continue

0 commit comments

Comments
 (0)