From de54bf1afc37ed1d621a3ae5362b9f35b198466a Mon Sep 17 00:00:00 2001 From: ANSHUL SINGH <72524975+ekanshul@users.noreply.github.com> Date: Thu, 20 Aug 2026 02:30:22 +0530 Subject: [PATCH] [docutils] Type Publisher attributes and the source/destination classes in docutils.core Co-Authored-By: Claude Fable 5 --- stubs/docutils/docutils/core.pyi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/stubs/docutils/docutils/core.pyi b/stubs/docutils/docutils/core.pyi index 3532dd0d86d6..96a3fe1ee316 100644 --- a/stubs/docutils/docutils/core.pyi +++ b/stubs/docutils/docutils/core.pyi @@ -2,8 +2,8 @@ from _typeshed import Incomplete, StrPath from typing import Final from typing_extensions import deprecated -from docutils import SettingsSpec -from docutils.io import FileInput, Input, Output +from docutils import SettingsSpec, nodes +from docutils.io import Input, Output from docutils.parsers import Parser from docutils.readers import Reader from docutils.utils import SystemMessage @@ -12,14 +12,14 @@ from docutils.writers import Writer, _WriterParts __docformat__: Final = "reStructuredText" class Publisher: - document: Incomplete | None + document: nodes.document | None reader: Reader[Incomplete] parser: Parser writer: Writer[Incomplete] source: Input[Incomplete] - source_class: Incomplete + source_class: type[Input[Incomplete]] destination: Output | None - destination_class: Incomplete + destination_class: type[Output] settings: dict[str, Incomplete] def __init__( self, @@ -27,9 +27,9 @@ class Publisher: parser: Parser | None = None, writer: Writer[Incomplete] | None = None, source: Input[Incomplete] | None = None, - source_class=..., + source_class: type[Input[Incomplete]] = ..., destination: Output | None = None, - destination_class=..., + destination_class: type[Output] = ..., settings: dict[str, Incomplete] | None = None, ) -> None: ... def set_reader(self, reader: str, parser: Parser | None = None, parser_name: str | None = None) -> None: ... @@ -129,7 +129,7 @@ def publish_string( def publish_parts( source, source_path: StrPath | None = None, - source_class=..., + source_class: type[Input[Incomplete]] = ..., destination_path: StrPath | None = None, reader=None, reader_name: str | None = None, @@ -146,7 +146,7 @@ def publish_parts( def publish_doctree( source, source_path: StrPath | None = None, - source_class=..., + source_class: type[Input[Incomplete]] = ..., reader=None, reader_name: str | None = None, parser=None, @@ -185,13 +185,13 @@ def publish_cmdline_to_binary( usage: str = "%prog [options] [ []]", description: str = ..., destination=None, - destination_class=..., + destination_class: type[Output] = ..., ): ... def publish_programmatically( - source_class: type[FileInput], + source_class: type[Input[Incomplete]], source, source_path: StrPath | None, - destination_class, + destination_class: type[Output], destination, destination_path: StrPath | None, reader,