X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/fc6cea0f0e0f6da99fffbedbfcf3d50cc0e641a4..c76e0b03ec706619cc76bbd45e9c355c18462e2e:/src/black/linegen.py diff --git a/src/black/linegen.py b/src/black/linegen.py index b6b83da..0091cbb 100644 --- a/src/black/linegen.py +++ b/src/black/linegen.py @@ -215,6 +215,18 @@ class LineGenerator(Visitor[Line]): yield from self.visit(child) + def visit_typeparams(self, node: Node) -> Iterator[Line]: + yield from self.visit_default(node) + node.children[0].prefix = "" + + def visit_typevartuple(self, node: Node) -> Iterator[Line]: + yield from self.visit_default(node) + node.children[1].prefix = "" + + def visit_paramspec(self, node: Node) -> Iterator[Line]: + yield from self.visit_default(node) + node.children[1].prefix = "" + def visit_dictsetmaker(self, node: Node) -> Iterator[Line]: if Preview.wrap_long_dict_values_in_parens in self.mode: for i, child in enumerate(node.children):