1. Robert Lehmann
  2. sphinx-sidebar

Commits

Georg Brandl  committed 2c5a02a

Fix docs of emit_firstresult().

  • Participants
  • Parent commits edd1247
  • Branches default

Comments (0)

Files changed (2)

File doc/ext/appapi.rst

View file
  • Ignore whitespace
 .. method:: Sphinx.emit_firstresult(event, *arguments)
 
    Emit *event* and pass *arguments* to the callback functions.  Return the
-   result of the first callback that doesn't return ``None`` (and don't call
-   the rest of the callbacks).
+   result of the first callback that doesn't return ``None``.
 
    .. versionadded:: 0.5
 

File sphinx/application.py

View file
  • Ignore whitespace
             event.pop(listener_id, None)
 
     def emit(self, event, *args):
-        result = []
+        results = []
         if event in self._listeners:
             for _, callback in self._listeners[event].iteritems():
-                result.append(callback(self, *args))
-        return result
+                results.append(callback(self, *args))
+        return results
 
     def emit_firstresult(self, event, *args):
         for result in self.emit(event, *args):