@@ -2,15 +2,64 @@ from _typeshed import Incomplete
2
2
from collections .abc import Callable , Sequence
3
3
from re import Match , Pattern
4
4
from types import ModuleType
5
- from typing import Any
5
+ from typing import Any , TypeVar
6
6
from typing_extensions import TypeAlias
7
7
8
8
from docutils import nodes
9
+ from docutils .statemachine import StateMachineWS , StateWS
9
10
from docutils .utils import Reporter
10
11
12
+ _Context = TypeVar ("_Context" )
13
+
11
14
class Struct :
12
15
def __init__ (self , ** keywordargs ) -> None : ...
13
16
17
+ class RSTState (StateWS [_Context ]):
18
+ nested_sm : type [StateMachineWS [_Context ]]
19
+ nested_sm_cache : Incomplete
20
+ nested_sm_kwargs : Incomplete
21
+ def __init__ (self , state_machine , debug : bool = False ) -> None : ...
22
+ memo : Incomplete
23
+ reporter : Incomplete
24
+ inliner : Incomplete
25
+ document : nodes .document
26
+ parent : Incomplete
27
+ def runtime_init (self ) -> None : ...
28
+ def goto_line (self , abs_line_offset ) -> None : ...
29
+ def no_match (self , context , transitions ): ...
30
+ def bof (self , context ): ...
31
+ def nested_parse (
32
+ self ,
33
+ block ,
34
+ input_offset ,
35
+ node ,
36
+ match_titles : bool = False ,
37
+ state_machine_class : Incomplete | None = None ,
38
+ state_machine_kwargs : Incomplete | None = None ,
39
+ ): ...
40
+ def nested_list_parse (
41
+ self ,
42
+ block ,
43
+ input_offset ,
44
+ node ,
45
+ initial_state ,
46
+ blank_finish ,
47
+ blank_finish_state : Incomplete | None = None ,
48
+ extra_settings = {},
49
+ match_titles : bool = False ,
50
+ state_machine_class : Incomplete | None = None ,
51
+ state_machine_kwargs : Incomplete | None = None ,
52
+ ): ...
53
+ def section (self , title , source , style , lineno , messages ) -> None : ...
54
+ def check_subsection (self , source , style , lineno ): ...
55
+ def title_inconsistent (self , sourcetext , lineno ): ...
56
+ def new_subsection (self , title , lineno , messages ) -> None : ...
57
+ def paragraph (self , lines , lineno ): ...
58
+ def inline_text (self , text , lineno ): ...
59
+ def unindent_warning (self , node_name ): ...
60
+
61
+ def build_regexp (definition , compile : bool = True ): ...
62
+
14
63
_BasicDefinition : TypeAlias = tuple [str , str , str , list [Pattern [str ]]]
15
64
_DefinitionParts : TypeAlias = tuple [str , str , str , list [Pattern [str ] | _BasicDefinition ]]
16
65
_DefinitionType : TypeAlias = tuple [str , str , str , list [Pattern [str ] | _DefinitionParts ]]
0 commit comments