mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-27 18:25:42 +08:00
Suppress image warning.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
from environmentSetup import supress_nonlocal_image_warn
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
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))
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
checkDependencies()
|
||||
+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