Index: sphinx/ext/autodoc.py =================================================================== --- sphinx/ext/autodoc.py (revision 65486) +++ sphinx/ext/autodoc.py (working copy) @@ -310,7 +310,7 @@ if hasattr(self.env, 'autodoc_current_class'): mod_cls = self.env.autodoc_current_class # ... or from a class directive - if not mod_cls: + else: mod_cls = self.env.currclass mod, cls = rpartition(mod_cls, '.') # if the module name is still missing, get it like above