Commits

Georg Brandl committed fa2467e

Fix output for complicated signatures in latex.

  • Participants
  • Parent commits 37d557f

Comments (0)

Files changed (1)

sphinx/writers/latex.py

         else:
             self.body.append(r'\pysigline{')
     def depart_desc_signature(self, node):
-        self.body.append('}{}')
+        self.body.append('}')
 
     def visit_desc_addname(self, node):
         self.body.append(r'\code{')
         pass
 
     def visit_desc_returns(self, node):
-        self.body.append(r'}{ $\rightarrow$ ')
+        self.body.append(r'{ $\rightarrow$ ')
     def depart_desc_returns(self, node):
-        pass
+        self.body.append(r'}')
 
     def visit_desc_name(self, node):
         self.body.append(r'\bfcode{')
         self.literal_whitespace -= 1
 
     def visit_desc_parameterlist(self, node):
+        # close name, open parameterlist
         self.body.append('}{')
         self.first_param = 1
     def depart_desc_parameterlist(self, node):
-        pass
+        # close parameterlist, open return annotation
+        self.body.append('}{')
 
     def visit_desc_parameter(self, node):
         if not self.first_param: