X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/7c94ed61a55f8ae0c60737cbc6cfee3b5066ce11..092959ff1f9253347b01eeb2d6d72e15bad7e25a:/src/black/linegen.py diff --git a/src/black/linegen.py b/src/black/linegen.py index c1cd6fa..dc238c3 100644 --- a/src/black/linegen.py +++ b/src/black/linegen.py @@ -815,9 +815,10 @@ def normalize_invisible_parens(node: Node, parens_after: Set[str]) -> None: # "import from" nodes store parentheses directly as part of # the statement if is_lpar_token(child): + assert is_rpar_token(node.children[-1]) # make parentheses invisible child.value = "" - node.children[-1].value = "" # type: ignore + node.children[-1].value = "" elif child.type != token.STAR: # insert invisible parentheses node.insert_child(index, Leaf(token.LPAR, ""))