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