Skip to content

Commit 31630d7

Browse files
authored
[docutils] Update to 0.22.1 (#14737)
1 parent 70e6f63 commit 31630d7

File tree

4 files changed

+13
-30
lines changed

4 files changed

+13
-30
lines changed

stubs/docutils/@tests/stubtest_allowlist.txt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,4 @@ docutils.parsers.recommonmark_wrapper
2121
docutils.writers.odf_odt.pygmentsformatter # import `pygments` third-party library
2222

2323
# `TYPE_CHECKING` variable is for internal use:
24-
docutils.TYPE_CHECKING
25-
docutils.core.TYPE_CHECKING
26-
docutils.examples.TYPE_CHECKING
27-
docutils.frontend.TYPE_CHECKING
28-
docutils.io.TYPE_CHECKING
29-
docutils.languages.TYPE_CHECKING
30-
docutils.nodes.TYPE_CHECKING
31-
docutils.parsers.TYPE_CHECKING
32-
docutils.parsers.rst.directives.TYPE_CHECKING
33-
docutils.parsers.rst.directives.misc.TYPE_CHECKING
34-
docutils.parsers.rst.languages.TYPE_CHECKING
35-
docutils.readers.TYPE_CHECKING
36-
docutils.utils.TYPE_CHECKING
37-
docutils.writers.TYPE_CHECKING
38-
docutils.writers._html_base.TYPE_CHECKING
24+
docutils.*\.TYPE_CHECKING

stubs/docutils/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "0.22.*"
1+
version = "0.22.1"
22
upstream_repository = "https://sourceforge.net/p/docutils/code"

stubs/docutils/docutils/parsers/rst/states.pyi

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class RSTStateMachine(StateMachineWS[list[str]]):
2626
document: nodes.document
2727
reporter: Reporter
2828
node: nodes.document | None
29+
section_level_offset: int
2930
def run( # type: ignore[override]
3031
self,
3132
input_lines: Sequence[str] | StringList,
@@ -35,13 +36,9 @@ class RSTStateMachine(StateMachineWS[list[str]]):
3536
inliner: Inliner | None = None,
3637
) -> None: ...
3738

38-
class NestedStateMachine(StateMachineWS[list[str]]):
39-
match_titles: bool
40-
memo: Incomplete
41-
document: nodes.document
42-
reporter: Reporter
43-
language: Incomplete
44-
node: Incomplete
39+
class NestedStateMachine(RSTStateMachine):
40+
parent_state_machine: Incomplete | None
41+
def __init__(self, state_classes, initial_state, debug: bool = False, parent_state_machine=None) -> None: ...
4542
def run( # type: ignore[override]
4643
self, input_lines: Sequence[str] | StringList, input_offset: int, memo, node, match_titles: bool = True
4744
) -> list[str]: ...
@@ -61,13 +58,13 @@ class RSTState(StateWS[list[str]]):
6158
def bof(self, context: list[str]): ...
6259
def nested_parse(
6360
self,
64-
block,
61+
block: StringList,
6562
input_offset: int,
66-
node,
63+
node: nodes.Element | None = None,
6764
match_titles: bool = False,
68-
state_machine_class: type[StateMachine[list[str]]] | None = None,
69-
state_machine_kwargs=None,
70-
): ...
65+
state_machine_class: StateMachineWS[Incomplete] | None = None,
66+
state_machine_kwargs: dict[Incomplete, Incomplete] | None = None,
67+
) -> int: ...
7168
def nested_list_parse(
7269
self,
7370
block,

stubs/docutils/docutils/writers/latex2e/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
216216
def attval(self, text: str, whitespace: re.Pattern[str] = ...) -> str: ...
217217
def is_inline(self, node: nodes.Node) -> bool: ...
218218
def ids_to_labels(
219-
self, node: nodes.Element, set_anchor: bool = True, protect: bool = False, newline: bool = False
220-
) -> list[Incomplete]: ...
219+
self, node: nodes.Element, set_anchor: bool = True, protect: bool = False, newline: bool = False, pre_nl: bool = False
220+
) -> list[str]: ...
221221
def append_hypertargets(self, node: nodes.Element) -> None: ...
222222
def set_align_from_classes(self, node) -> None: ...
223223
def insert_align_declaration(self, node: nodes.Element, default: str | None = None) -> None: ...

0 commit comments

Comments
 (0)