Skip to content

Commit

Permalink
Update handling for nonlocal image warning in docs (sqlalchemy-redshi…
Browse files Browse the repository at this point in the history
…ft#119)

* Update handling for nonlocal image warning in docs

* Freeze doc package versions
  • Loading branch information
jklukas authored May 23, 2017
1 parent 230f874 commit 7f6d2bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-

from docutils.utils import get_source_line
import sphinx.environment

import sqlalchemy_redshift
Expand All @@ -11,10 +12,9 @@ def _short_version(release):


# Hide nonlocal image warnings.
_old_warn_node = sphinx.environment.BuildEnvironment.warn_node
def _warn_node(self, msg, node):
def _warn_node(self, msg, node, **kwargs):
if not msg.startswith('nonlocal image URI found:'):
_old_warn_node(self, msg, node)
self._warnfunc(msg, '%s:%s' % get_source_line(node), **kwargs)

sphinx.environment.BuildEnvironment.warn_node = _warn_node

Expand Down
4 changes: 2 additions & 2 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-e .
sphinx
numpydoc
sphinx==1.5.3
numpydoc==0.6.0

0 comments on commit 7f6d2bf

Please sign in to comment.