summaryrefslogtreecommitdiff
path: root/sphinx/ext/autosummary/__init__.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-05-03 22:40:19 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-05-03 23:34:35 +0900
commit41b4a77dea51cf5eb16f9a3fdc27426827313d54 (patch)
treeaad1d45e1e780ef69a4872d1d4122d5292fc0755 /sphinx/ext/autosummary/__init__.py
parenta5cba8cdbb9f44721885c8555bf875df1f59e199 (diff)
downloadsphinx-git-41b4a77dea51cf5eb16f9a3fdc27426827313d54.tar.gz
Add stacklevel parameter to warnings.warn() call
Diffstat (limited to 'sphinx/ext/autosummary/__init__.py')
-rw-r--r--sphinx/ext/autosummary/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py
index 57f775272..ed49c56df 100644
--- a/sphinx/ext/autosummary/__init__.py
+++ b/sphinx/ext/autosummary/__init__.py
@@ -659,7 +659,7 @@ def autolink_role(typ: str, rawtext: str, etext: str, lineno: int, inliner: Inli
Expands to ':obj:`text`' if `text` is an object that can be imported;
otherwise expands to '*text*'.
"""
- warnings.warn('autolink_role() is deprecated.', RemovedInSphinx40Warning)
+ warnings.warn('autolink_role() is deprecated.', RemovedInSphinx40Warning, stacklevel=2)
env = inliner.document.settings.env
pyobj_role = env.get_domain('py').role('obj')
objects, msg = pyobj_role('obj', rawtext, etext, lineno, inliner, options, content)