mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PCQA-658 Avoid direct OptionParser usage
`OptionParser` usages leads to deprecation warning which fails tests. `get_default_settings` helper function is better GitOrigin-RevId: 1b07de2f69776cf0774e73d021532cfbc3beccaf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ddac2b0b39
commit
296f164428
@@ -33,7 +33,7 @@ def format_fragments(fragments_list):
|
||||
def format_rest(docstring):
|
||||
from docutils import nodes
|
||||
from docutils.core import publish_string
|
||||
from docutils.frontend import OptionParser
|
||||
from docutils.frontend import get_default_settings
|
||||
from docutils.nodes import Text, field_body, field_name, SkipNode
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst.directives.admonitions import BaseAdmonition
|
||||
@@ -58,7 +58,7 @@ def format_rest(docstring):
|
||||
def __init__(self, document):
|
||||
# Copied from epydoc.markup.restructuredtext._EpydocHTMLTranslator
|
||||
if self.settings is None:
|
||||
settings = OptionParser([HTMLWriter()]).get_default_values()
|
||||
settings = get_default_settings(HTMLWriter())
|
||||
self.__class__.settings = settings
|
||||
document.settings = self.settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user