Skip to content

Commit

Permalink
Adds fix to compat style
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jul 19, 2018
1 parent d5f7668 commit 91eced8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wemake_python_styleguide/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def maybe_set_parent(tree: ast.AST) -> ast.AST:
"""Sets parents for all nodes that do not have this prop."""
for statement in ast.walk(tree):
for child in ast.iter_child_nodes(statement):
if not hasattr(child, 'parent'): # noqa: Z105
setattr(child, 'parent', statement) # noqa: Z105
if not hasattr(child, 'parent'): # noqa: Z113
setattr(child, 'parent', statement) # noqa: Z113

return tree

0 comments on commit 91eced8

Please sign in to comment.