mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
docutils - added missing stubs for __init__ methods (#5924)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -2,11 +2,9 @@ docutils.TransformSpec.unknown_reference_resolvers
|
||||
docutils.frontend.ConfigParser.__getattr__
|
||||
docutils.frontend.ConfigParser.read
|
||||
docutils.frontend.OptionParser.__getattr__
|
||||
docutils.frontend.OptionParser.__init__
|
||||
docutils.io.FileOutput.__getattr__
|
||||
docutils.io.FileOutput.__init__
|
||||
docutils.io.Input.__getattr__
|
||||
docutils.io.Input.__init__
|
||||
docutils.parsers.rst.Directive.__getattr__
|
||||
docutils.parsers.rst.Directive.__init__
|
||||
docutils.parsers.rst.nodes
|
||||
|
||||
@@ -1 +1 @@
|
||||
version = "0.1"
|
||||
version = "0.17"
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import optparse
|
||||
from collections.abc import Iterable, Mapping
|
||||
from configparser import RawConfigParser
|
||||
from typing import Any, ClassVar, Tuple
|
||||
from typing import Any, ClassVar, Tuple, Type
|
||||
|
||||
from docutils import SettingsSpec
|
||||
from docutils.parsers import Parser
|
||||
from docutils.utils import DependencyList
|
||||
|
||||
__docformat__: str
|
||||
@@ -60,6 +62,14 @@ class OptionParser(optparse.OptionParser, SettingsSpec):
|
||||
default_error_encoding_error_handler: ClassVar[str]
|
||||
config_section: ClassVar[str]
|
||||
version_template: ClassVar[str]
|
||||
def __init__(
|
||||
self,
|
||||
components: Iterable[Type[Parser]] = ...,
|
||||
defaults: Mapping[str, Any] | None = ...,
|
||||
read_config_files: bool | None = ...,
|
||||
*args,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
|
||||
class ConfigParser(RawConfigParser):
|
||||
|
||||
@@ -2,6 +2,7 @@ from typing import Any, ClassVar, Tuple
|
||||
from typing_extensions import Literal
|
||||
|
||||
from docutils import parsers
|
||||
from docutils.parsers.rst import states
|
||||
|
||||
class Parser(parsers.Parser):
|
||||
config_section_dependencies: ClassVar[Tuple[str, ...]]
|
||||
@@ -16,6 +17,18 @@ class DirectiveError(Exception):
|
||||
def __init__(self, level: Any, message: str) -> None: ...
|
||||
|
||||
class Directive:
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
arguments: list[Any],
|
||||
options: dict[str, Any],
|
||||
content: list[str],
|
||||
lineno: int,
|
||||
content_offset: int,
|
||||
block_text: str,
|
||||
state: states.RSTState,
|
||||
state_machine: states.RSTStateMachine,
|
||||
) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ... # incomplete
|
||||
|
||||
def convert_directive_function(directive_fn): ...
|
||||
|
||||
Reference in New Issue
Block a user