|
35 | 35 | )
|
36 | 36 | from docutils.parsers.rst.directives import flag, positive_int, unchanged, unchanged_required
|
37 | 37 | from docutils.statemachine import StringList
|
38 |
| -from sphinx.domains.std import StandardDomain |
39 | 38 | from sphinx.locale import __
|
40 | 39 | from sphinx.util.docutils import SphinxDirective
|
41 | 40 | from sphinx.util.logging import getLogger
|
|
44 | 43 | from collections.abc import Iterator
|
45 | 44 |
|
46 | 45 | from docutils.parsers.rst.states import RSTState, RSTStateMachine
|
| 46 | + from sphinx.domains.std import StandardDomain |
47 | 47 |
|
48 | 48 |
|
49 | 49 | class TextAsDefault(NamedTuple):
|
@@ -100,7 +100,7 @@ def __init__( # noqa: PLR0913
|
100 | 100 | options.setdefault("group_sub_title_prefix", None)
|
101 | 101 | super().__init__(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)
|
102 | 102 | self._parser: ArgumentParser | None = None
|
103 |
| - self._std_domain: StandardDomain = cast(StandardDomain, self.env.get_domain("std")) |
| 103 | + self._std_domain: StandardDomain = cast("StandardDomain", self.env.get_domain("std")) |
104 | 104 | self._raw_format: bool = False
|
105 | 105 | self.make_id = make_id_lower if "force_refs_lower" in self.options else make_id
|
106 | 106 |
|
@@ -281,7 +281,7 @@ def _mk_option_line(self, action: Action, prefix: str) -> list_item:
|
281 | 281 | temp = paragraph()
|
282 | 282 | self.state.nested_parse(StringList(help_text.split("\n")), 0, temp)
|
283 | 283 | line += Text(" - ")
|
284 |
| - for content in cast(paragraph, temp.children[0]).children: |
| 284 | + for content in cast("paragraph", temp.children[0]).children: |
285 | 285 | line += content
|
286 | 286 | if (
|
287 | 287 | "no_default_values" not in self.options
|
|
0 commit comments