diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-12 17:32:01 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-12 17:32:04 +0900 |
commit | 05036b9578f3743ee568ccd0dd4e35744b2e773c (patch) | |
tree | 33cc720b42e80f2ce55cbf458344a86df13ccc57 /sphinx/util/docutils.py | |
parent | bf491cff2f9464fb61cebeba5919196b046dea62 (diff) | |
download | sphinx-git-05036b9578f3743ee568ccd0dd4e35744b2e773c.tar.gz |
Remove SphinxTranslator.get_settings()
It was introduced to fake its type information and make mypy silent.
But the warnings had came from wrong typing of docutils-stubs.
(see https://github.com/tk0miya/docutils-stubs/pull/28)
After the fix, the helper method is not needed for us. So this
removes it right away.
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r-- | sphinx/util/docutils.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index cdf5f2e19..aa0b737eb 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -398,16 +398,7 @@ class SphinxTranslator(nodes.NodeVisitor): super(SphinxTranslator, self).__init__(document) self.builder = builder self.config = builder.config - - def get_settings(self): - # type: () -> Any - """Get settings object with type safe. - - .. note:: It is hard to check types for settings object because it's attributes - are added dynamically. This method avoids the type errors through - imitating it's type as Any. - """ - return self.document.settings + self.settings = document.settings # cache a vanilla instance of nodes.document |