Skip to content

Commit

Permalink
Use a 'pass' statement since 'maybe_make_parens_invisible_in_atom' cu…
Browse files Browse the repository at this point in the history
…rrently always returns False for non-atom nodes, making the 'wrap_in_parentheses' call unreachable
  • Loading branch information
jayaddison committed Feb 3, 2021
1 parent fdff084 commit 0bb718c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/black/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5382,8 +5382,7 @@ def normalize_invisible_parens(node: Node, parens_after: Set[str]) -> None:
node.append_child(Leaf(token.RPAR, ""))
break
elif node.type in [syms.assert_stmt, syms.return_stmt]:
if maybe_make_parens_invisible_in_atom(child, parent=node):
wrap_in_parentheses(node, child, visible=False)
pass

elif not (isinstance(child, Leaf) and is_multiline_string(child)):
wrap_in_parentheses(node, child, visible=False)
Expand Down

0 comments on commit 0bb718c

Please sign in to comment.