summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/directive.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/autodoc/directive.py
parenta5cba8cdbb9f44721885c8555bf875df1f59e199 (diff)
downloadsphinx-git-41b4a77dea51cf5eb16f9a3fdc27426827313d54.tar.gz
Add stacklevel parameter to warnings.warn() call
Diffstat (limited to 'sphinx/ext/autodoc/directive.py')
-rw-r--r--sphinx/ext/autodoc/directive.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py
index 3be19f089..9a3428f5d 100644
--- a/sphinx/ext/autodoc/directive.py
+++ b/sphinx/ext/autodoc/directive.py
@@ -66,7 +66,7 @@ class DocumenterBridge:
else:
# create fake object for self.state.document.settings.tab_width
warnings.warn('DocumenterBridge requires a state object on instantiation.',
- RemovedInSphinx40Warning)
+ RemovedInSphinx40Warning, stacklevel=2)
settings = Struct(tab_width=8)
document = Struct(settings=settings)
self.state = Struct(document=document)