Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
d1618033 committed Jan 30, 2020
1 parent aa639dc commit 9431952
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pylint_single_element_destructuring/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def visit_assign(self, node):
if len(targets) != 1:
return
target = targets[0]
if hasattr(target, "pytype") and target.pytype() in ["builtins.tuple", "builtins.list"] and len(list(target.get_children())) == 1:
self.add_message(self.SINGLE_ELEMENT_DESTRUCTURING_MSG, node=node)
if hasattr(target, "pytype") and target.pytype() in ["builtins.tuple", "builtins.list"]:
if len(list(target.get_children())) == 1:
self.add_message(self.SINGLE_ELEMENT_DESTRUCTURING_MSG, node=node)


def register(linter):
Expand Down

0 comments on commit 9431952

Please sign in to comment.