Commit b6d02fa9 authored by Iustin Pop's avatar Iustin Pop
Browse files

sphinx_ext: workaround epydoc warning

Similar to commit c29e35fe

, this works around epydoc breakage by
aliasing the module. Makes 'apidoc' pass again on my machine.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent c6b1c8ef
...@@ -32,6 +32,8 @@ import docutils.utils ...@@ -32,6 +32,8 @@ import docutils.utils
import sphinx.errors import sphinx.errors
import sphinx.util.compat import sphinx.util.compat
s_compat = sphinx.util.compat
from ganeti import constants from ganeti import constants
from ganeti import compat from ganeti import compat
from ganeti import errors from ganeti import errors
...@@ -147,7 +149,7 @@ def _BuildOpcodeResult(op_id): ...@@ -147,7 +149,7 @@ def _BuildOpcodeResult(op_id):
return "``%s``" % result_fn return "``%s``" % result_fn
class OpcodeParams(sphinx.util.compat.Directive): class OpcodeParams(s_compat.Directive):
"""Custom directive for opcode parameters. """Custom directive for opcode parameters.
See also <http://docutils.sourceforge.net/docs/howto/rst-directives.html>. See also <http://docutils.sourceforge.net/docs/howto/rst-directives.html>.
...@@ -178,7 +180,7 @@ class OpcodeParams(sphinx.util.compat.Directive): ...@@ -178,7 +180,7 @@ class OpcodeParams(sphinx.util.compat.Directive):
return [] return []
class OpcodeResult(sphinx.util.compat.Directive): class OpcodeResult(s_compat.Directive):
"""Custom directive for opcode result. """Custom directive for opcode result.
See also <http://docutils.sourceforge.net/docs/howto/rst-directives.html>. See also <http://docutils.sourceforge.net/docs/howto/rst-directives.html>.
...@@ -230,7 +232,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner, ...@@ -230,7 +232,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner,
return ([node], []) return ([node], [])
class PythonAssert(sphinx.util.compat.Directive): class PythonAssert(s_compat.Directive):
"""Custom directive for writing assertions. """Custom directive for writing assertions.
The content must be a valid Python expression. If its result does not The content must be a valid Python expression. If its result does not
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment