mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-14 12:50:10 +08:00
Suppress image warning.
This commit is contained in:
+10
-1
@@ -258,5 +258,14 @@ texinfo_documents = [
|
||||
|
||||
autodoc_member_order = 'bysource'
|
||||
|
||||
from _ext import supress_nonlocal_image_warn
|
||||
def supress_nonlocal_image_warn():
|
||||
import sphinx.environment
|
||||
sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_warn
|
||||
|
||||
def _supress_nonlocal_image_warn(self, msg, node):
|
||||
from docutils.utils import get_source_line
|
||||
|
||||
if not msg.startswith('nonlocal image URI found:'):
|
||||
self._warnfunc(msg, '%s:%s' % get_source_line(node))
|
||||
|
||||
supress_nonlocal_image_warn()
|
||||
|
||||
Reference in New Issue
Block a user