1. Tay Ray Chuan
  2. sphinx


Tay Ray Chuan  committed 90e9599

autodoc: give precedence to user-specified module

The autodoc test (".. autodata:: ClassInstance") now shows "Class
instance to document".

  • Participants
  • Parent commits ef99412
  • Branches default

Comments (0)

Files changed (1)

File sphinx/ext/autodoc.py

View file
  • Ignore whitespace
         Get the real module name of an object to document.  (It can differ
         from the name of the module through which the object was imported.)
-        return self.get_attr(self.object, '__module__', None) or self.modname
+        return self.modname or self.get_attr(self.object, '__module__', None)
     def check_module(self):