X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f0a99f640279adade284eba592630c67ad374574..ced2d656794568517ba9aa28f781f9151d89de54:/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, ""))