mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
improve type annotations in 'docutils.parsers.rst.directives.misc' (#11524)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -10,6 +10,7 @@ docutils.nodes.GenericNodeVisitor.__getattr__
|
||||
# these methods take a rawsource parameter that has been deprecated and is completely ignored, so we omit it from the stub
|
||||
docutils.nodes.Text.__new__
|
||||
docutils.parsers.recommonmark_wrapper
|
||||
docutils.parsers.rst.directives.misc.MetaBody.__getattr__
|
||||
docutils.transforms.Transform.__getattr__
|
||||
docutils.transforms.Transformer.__getattr__
|
||||
docutils.TransformSpec.unknown_reference_resolvers
|
||||
|
||||
@@ -1,3 +1,36 @@
|
||||
from _typeshed import Incomplete
|
||||
from pathlib import Path
|
||||
from re import Pattern
|
||||
from typing import ClassVar
|
||||
|
||||
def __getattr__(name: str) -> Incomplete: ...
|
||||
from docutils.parsers.rst import Directive
|
||||
from docutils.parsers.rst.states import SpecializedBody
|
||||
|
||||
__docformat__: str
|
||||
|
||||
class Include(Directive):
|
||||
standard_include_path: Path
|
||||
|
||||
class Raw(Directive): ...
|
||||
class Replace(Directive): ...
|
||||
|
||||
class Unicode(Directive):
|
||||
comment_pattern: Pattern[str]
|
||||
|
||||
class Class(Directive): ...
|
||||
|
||||
class Role(Directive):
|
||||
argument_pattern: Pattern[str]
|
||||
|
||||
class DefaultRole(Directive): ...
|
||||
class Title(Directive): ...
|
||||
|
||||
# SpecializedBody has not yet been stubbed
|
||||
class MetaBody(SpecializedBody): # pyright: ignore[reportUntypedBaseClass]
|
||||
def __getattr__(self, name: str) -> Incomplete: ...
|
||||
|
||||
class Meta(Directive):
|
||||
SMkwargs: ClassVar[dict[str, tuple[MetaBody]]]
|
||||
|
||||
class Date(Directive): ...
|
||||
class TestDirective(Directive): ...
|
||||
|
||||
Reference in New Issue
Block a user