Commit 1aa50158 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add pylint disables to Sphinx extension


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent ef127bec
...@@ -165,11 +165,16 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner, ...@@ -165,11 +165,16 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner,
The expression's result is included as a literal. The expression's result is included as a literal.
""" """
# pylint: disable-msg=W0102,W0613,W0142
# W0102: Dangerous default value as argument
# W0142: Used * or ** magic
# W0613: Unused argument
code = docutils.utils.unescape(text, restore_backslashes=True) code = docutils.utils.unescape(text, restore_backslashes=True)
try: try:
result = eval(code, EVAL_NS) result = eval(code, EVAL_NS)
except Exception, err: except Exception, err: # pylint: disable-msg=W0703
msg = inliner.reporter.error("Failed to evaluate %r: %s" % (code, err), msg = inliner.reporter.error("Failed to evaluate %r: %s" % (code, err),
line=lineno) line=lineno)
return ([inliner.problematic(rawtext, rawtext, msg)], [msg]) return ([inliner.problematic(rawtext, rawtext, msg)], [msg])
......
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