diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-05-15 00:09:58 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-05-15 00:09:58 +0900 |
commit | db4dd6c9f90dbdeed00eef42fcbe5699903c6782 (patch) | |
tree | 1e29aa7a8912b4a4a1943527d0d9ba243aea7973 /sphinx/ext/autosummary/__init__.py | |
parent | af9df449ea7c1c0dca7ebc39d66bc162a45bec4b (diff) | |
download | sphinx-git-db4dd6c9f90dbdeed00eef42fcbe5699903c6782.tar.gz |
Fix FakeDirective emits warnings
Diffstat (limited to 'sphinx/ext/autosummary/__init__.py')
-rw-r--r-- | sphinx/ext/autosummary/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index 656e67bf1..70d501f85 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -63,7 +63,7 @@ from typing import List, cast from docutils import nodes from docutils.parsers.rst import directives -from docutils.parsers.rst.states import RSTStateMachine, state_classes +from docutils.parsers.rst.states import RSTStateMachine, Struct, state_classes from docutils.statemachine import StringList import sphinx @@ -175,7 +175,10 @@ _app = None # type: Sphinx class FakeDirective(DocumenterBridge): def __init__(self): # type: () -> None - super().__init__({}, None, Options(), 0, None) # type: ignore + settings = Struct(tab_width=8) + document = Struct(settings=settings) + state = Struct(document=document) + super().__init__({}, None, Options(), 0, state) # type: ignore def get_documenter(app, obj, parent): |