mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Ignore classes in conf.py.
This commit is contained in:
parent
f86f8fde25
commit
b2aedf951d
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user