mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Switch check
This commit is contained in:
parent
0768f22aa1
commit
eae646504f
@ -203,9 +203,9 @@ class _UnparseVisitor(ast.NodeVisitor):
|
|||||||
|
|
||||||
def visit_UnaryOp(self, node: ast.UnaryOp) -> str:
|
def visit_UnaryOp(self, node: ast.UnaryOp) -> str:
|
||||||
# UnaryOp is one of {UAdd, USub, Invert, Not}. Only Not needs a space.
|
# UnaryOp is one of {UAdd, USub, Invert, Not}. Only Not needs a space.
|
||||||
if not isinstance(node.op, ast.Not):
|
if isinstance(node.op, ast.Not):
|
||||||
return "%s%s" % (self.visit(node.op), self.visit(node.operand))
|
return "%s %s" % (self.visit(node.op), self.visit(node.operand))
|
||||||
return "%s %s" % (self.visit(node.op), self.visit(node.operand))
|
return "%s%s" % (self.visit(node.op), self.visit(node.operand))
|
||||||
|
|
||||||
def visit_Tuple(self, node: ast.Tuple) -> str:
|
def visit_Tuple(self, node: ast.Tuple) -> str:
|
||||||
if len(node.elts) == 0:
|
if len(node.elts) == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user