Created
March 27, 2010 04:47
-
-
Save rctay/345738 to your computer and use it in GitHub Desktop.
[sphinx] autodoc support for module-level properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r f76fb0be8011 sphinx/ext/autodoc.py | |
--- a/sphinx/ext/autodoc.py Mon Mar 01 23:12:59 2010 +0100 | |
+++ b/sphinx/ext/autodoc.py Sat Mar 27 12:46:20 2010 +0800 | |
@@ -336,7 +336,7 @@ | |
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): | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment