Commits

Georg Brandl  committed f0aba27

Fix automethod outside class context.

  • Participants
  • Parent commits 085eefc

Comments (0)

Files changed (2)

 Release 0.5.1 (in development)
 ==============================
 
+* Fix autodoc crash when automethod is used outside a class context.
+
 * Fix LaTeX writer output for images with specified height.
 
 * Fix wrong generated image path when including images in sources

File sphinx/ext/autodoc.py

                 # ... or from a class directive
                 if mod_cls is None:
                     mod_cls = self.env.currclass
+                # ... if still None, there's no way to know
+                if mod_cls is None:
+                    return fullname, None, [], args, retann
             mod, cls = rpartition(mod_cls, '.')
             # if the module name is still missing, get it like above
             if not mod and hasattr(self.env, 'autodoc_current_module'):