Ignore classes in conf.py.

This commit is contained in:
Georg Brandl 2008-04-22 17:41:12 +00:00
parent f86f8fde25
commit b2aedf951d
2 changed files with 4 additions and 3 deletions

View File

@ -181,7 +181,8 @@ class BuildEnvironment:
for key, val in vars(self.config).items():
if key.startswith('_') or \
isinstance(val, types.ModuleType) or \
isinstance(val, types.FunctionType):
isinstance(val, types.FunctionType) or \
isinstance(val, (type, types.ClassType)):
del self.config[key]
try:
pickle.dump(self, picklefile, pickle.HIGHEST_PROTOCOL)

View File

@ -102,8 +102,8 @@ def generate_rst(what, name, members, undoc, add_content, document, lineno,
if mod is None:
warning = document.reporter.warning(
'don\'t know which module to import for documenting '
'%r (try placing a "module" directive in the document, '
'don\'t know which module to import for documenting %r '
'(try placing a "module" or "currentmodule" directive in the document, '
'or giving an explicit module name)' % name, line=lineno)
return [warning], result