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():
|
for key, val in vars(self.config).items():
|
||||||
if key.startswith('_') or \
|
if key.startswith('_') or \
|
||||||
isinstance(val, types.ModuleType) or \
|
isinstance(val, types.ModuleType) or \
|
||||||
isinstance(val, types.FunctionType):
|
isinstance(val, types.FunctionType) or \
|
||||||
|
isinstance(val, (type, types.ClassType)):
|
||||||
del self.config[key]
|
del self.config[key]
|
||||||
try:
|
try:
|
||||||
pickle.dump(self, picklefile, pickle.HIGHEST_PROTOCOL)
|
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:
|
if mod is None:
|
||||||
warning = document.reporter.warning(
|
warning = document.reporter.warning(
|
||||||
'don\'t know which module to import for documenting '
|
'don\'t know which module to import for documenting %r '
|
||||||
'%r (try placing a "module" directive in the document, '
|
'(try placing a "module" or "currentmodule" directive in the document, '
|
||||||
'or giving an explicit module name)' % name, line=lineno)
|
'or giving an explicit module name)' % name, line=lineno)
|
||||||
return [warning], result
|
return [warning], result
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user