mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Expand comment
This commit is contained in:
parent
3dc6ed166f
commit
05b835114b
@ -202,7 +202,8 @@ class _UnparseVisitor(ast.NodeVisitor):
|
||||
return "%s[%s]" % (self.visit(node.value), self.visit(node.slice))
|
||||
|
||||
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}, which refer to ``+x``,
|
||||
# ``-x``, ``~x``, and ``not x``. Only Not needs a space.
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user