mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[docutils] Add missing stubs for readers dir (#14242)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, ClassVar, Generic, TypeVar
|
||||
from typing import Any, ClassVar, Final, Generic, TypeVar
|
||||
|
||||
from docutils import Component, nodes
|
||||
from docutils.frontend import Values
|
||||
@@ -8,6 +8,8 @@ from docutils.transforms import Transform
|
||||
|
||||
_S = TypeVar("_S")
|
||||
|
||||
__docformat__: Final = "reStructuredText"
|
||||
|
||||
class Reader(Component, Generic[_S]):
|
||||
component_type: ClassVar[str]
|
||||
config_section: ClassVar[str]
|
||||
@@ -15,8 +17,9 @@ class Reader(Component, Generic[_S]):
|
||||
def __init__(self, parser: Parser | None = None, parser_name: str | None = None) -> None: ...
|
||||
parser: Parser | None
|
||||
source: Input[_S] | None
|
||||
input: str | Any | None
|
||||
input: str | None
|
||||
def set_parser(self, parser_name: str) -> None: ...
|
||||
settings: Values
|
||||
def read(self, source: Input[_S], parser: Parser, settings: Values) -> nodes.document: ...
|
||||
document: nodes.document
|
||||
def parse(self) -> None: ...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from typing import TypeVar
|
||||
from typing import ClassVar, TypeVar
|
||||
|
||||
from docutils import readers
|
||||
|
||||
_S = TypeVar("_S", bound=str | bytes)
|
||||
|
||||
class Reader(readers.ReReader[_S]): ...
|
||||
class Reader(readers.ReReader[_S]):
|
||||
config_section_dependencies: ClassVar[tuple[str, ...]]
|
||||
|
||||
@@ -1 +1,12 @@
|
||||
def __getattr__(name: str): ... # incomplete module
|
||||
from typing import ClassVar, Final, TypeVar
|
||||
|
||||
from docutils.parsers.rst import states
|
||||
from docutils.readers import standalone
|
||||
|
||||
__docformat__: Final = "reStructuredText"
|
||||
|
||||
_S = TypeVar("_S", bound=str | bytes)
|
||||
|
||||
class Reader(standalone.Reader[_S]):
|
||||
settings_default_overrides: ClassVar[dict[str, int]]
|
||||
inliner_class: ClassVar[type[states.Inliner]]
|
||||
|
||||
@@ -1 +1,11 @@
|
||||
def __getattr__(name: str): ... # incomplete module
|
||||
from typing import ClassVar, Final, TypeVar
|
||||
|
||||
from docutils import readers
|
||||
|
||||
__docformat__: Final = "reStructuredText"
|
||||
|
||||
_S = TypeVar("_S", bound=str | bytes)
|
||||
|
||||
class Reader(readers.Reader[_S]):
|
||||
document: None # type: ignore[assignment]
|
||||
config_section_dependencies: ClassVar[tuple[str, ...]]
|
||||
|
||||
Reference in New Issue
Block a user