mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
improve type annotations in 'docutils.parsers.rst.states' (#11545)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Sequence
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from re import Match, Pattern
|
||||
from types import ModuleType
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.statemachine import StateMachineWS, StateWS
|
||||
from docutils.statemachine import StateMachine, StateMachineWS, StateWS
|
||||
from docutils.utils import Reporter
|
||||
|
||||
class Struct:
|
||||
@@ -18,27 +18,27 @@ class RSTState(StateWS[list[str]]):
|
||||
nested_sm_kwargs: Incomplete
|
||||
def __init__(self, state_machine, debug: bool = False) -> None: ...
|
||||
memo: Incomplete
|
||||
reporter: Incomplete
|
||||
inliner: Incomplete
|
||||
reporter: Reporter
|
||||
inliner: Inliner
|
||||
document: nodes.document
|
||||
parent: Incomplete
|
||||
def runtime_init(self) -> None: ...
|
||||
def goto_line(self, abs_line_offset) -> None: ...
|
||||
def no_match(self, context, transitions): ...
|
||||
def bof(self, context): ...
|
||||
def goto_line(self, abs_line_offset: int) -> None: ...
|
||||
def no_match(self, context: list[str], transitions): ...
|
||||
def bof(self, context: list[str]): ...
|
||||
def nested_parse(
|
||||
self,
|
||||
block,
|
||||
input_offset,
|
||||
input_offset: int,
|
||||
node,
|
||||
match_titles: bool = False,
|
||||
state_machine_class: Incomplete | None = None,
|
||||
state_machine_class: type[StateMachine[list[str]]] | None = None,
|
||||
state_machine_kwargs: Incomplete | None = None,
|
||||
): ...
|
||||
def nested_list_parse(
|
||||
self,
|
||||
block,
|
||||
input_offset,
|
||||
input_offset: int,
|
||||
node,
|
||||
initial_state,
|
||||
blank_finish,
|
||||
@@ -48,13 +48,13 @@ class RSTState(StateWS[list[str]]):
|
||||
state_machine_class: Incomplete | None = None,
|
||||
state_machine_kwargs: Incomplete | None = None,
|
||||
): ...
|
||||
def section(self, title, source, style, lineno, messages) -> None: ...
|
||||
def check_subsection(self, source, style, lineno): ...
|
||||
def title_inconsistent(self, sourcetext, lineno): ...
|
||||
def new_subsection(self, title, lineno, messages) -> None: ...
|
||||
def paragraph(self, lines, lineno): ...
|
||||
def inline_text(self, text, lineno): ...
|
||||
def unindent_warning(self, node_name): ...
|
||||
def section(self, title: str, source, style, lineno: int, messages) -> None: ...
|
||||
def check_subsection(self, source, style, lineno: int): ...
|
||||
def title_inconsistent(self, sourcetext: str, lineno: int): ...
|
||||
def new_subsection(self, title: str, lineno: int, messages) -> None: ...
|
||||
def paragraph(self, lines: Iterable[str], lineno: int): ...
|
||||
def inline_text(self, text: str, lineno: int): ...
|
||||
def unindent_warning(self, node_name: str): ...
|
||||
|
||||
def build_regexp(definition, compile: bool = True): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user