Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve type annotations in 'docutils.readers.standalone' #13321

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stubs/docutils/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ docutils.nodes.Text.__new__
docutils.parsers.recommonmark_wrapper
docutils.parsers.rst.directives.admonitions.BaseAdmonition.node_class # must be overridden by base classes (pseudo-abstract)
docutils.parsers.rst.directives.misc.MetaBody.__getattr__
docutils.readers.standalone.Reader.document
docutils.statemachine.State.nested_sm # is initialised in __init__
docutils.statemachine.State.nested_sm_kwargs # is initialised in __init__
docutils.statemachine.ViewList.__iter__ # doesn't exist at runtime, but the class is iterable due to __getitem__
Expand Down
14 changes: 12 additions & 2 deletions stubs/docutils/docutils/readers/standalone.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
from _typeshed import Incomplete
__docformat__: str

def __getattr__(name: str) -> Incomplete: ...
from typing import ClassVar, TypeVar

from docutils import readers

_S = TypeVar("_S")

class Reader(readers.Reader[_S]):

supported: ClassVar[tuple[str]]

config_section_dependencies: ClassVar[tuple[str]]
Loading