Skip to content

Commit dfee232

Browse files
authored
[docutils] Fix issue with *_path params (#14383)
1 parent fbaced9 commit dfee232

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

stubs/docutils/docutils/core.pyi

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from _typeshed import Incomplete
1+
from _typeshed import Incomplete, StrPath
22
from typing import Final
33
from typing_extensions import deprecated
44

55
from docutils import SettingsSpec
66
from docutils.frontend import OptionParser
7-
from docutils.io import FileInput, Input, Output, StringInput
7+
from docutils.io import FileInput, Input, Output
88
from docutils.parsers import Parser
99
from docutils.readers import Reader
1010
from docutils.utils import SystemMessage
@@ -63,9 +63,9 @@ class Publisher:
6363
config_section=None,
6464
**defaults,
6565
) -> None: ...
66-
def set_io(self, source_path=None, destination_path=None) -> None: ...
67-
def set_source(self, source=None, source_path=None) -> None: ...
68-
def set_destination(self, destination=None, destination_path=None) -> None: ...
66+
def set_io(self, source_path: StrPath | None = None, destination_path: StrPath | None = None) -> None: ...
67+
def set_source(self, source=None, source_path: StrPath | None = None) -> None: ...
68+
def set_destination(self, destination=None, destination_path: StrPath | None = None) -> None: ...
6969
def apply_transforms(self) -> None: ...
7070
def publish(
7171
self,
@@ -104,9 +104,9 @@ def publish_cmdline(
104104
): ...
105105
def publish_file(
106106
source=None,
107-
source_path: FileInput | StringInput | None = None,
107+
source_path: StrPath | None = None,
108108
destination=None,
109-
destination_path: FileInput | StringInput | None = None,
109+
destination_path: StrPath | None = None,
110110
reader=None,
111111
reader_name: str = "standalone",
112112
parser=None,
@@ -121,8 +121,8 @@ def publish_file(
121121
): ...
122122
def publish_string(
123123
source,
124-
source_path: FileInput | StringInput | None = None,
125-
destination_path: FileInput | StringInput | None = None,
124+
source_path: StrPath | None = None,
125+
destination_path: StrPath | None = None,
126126
reader=None,
127127
reader_name: str = "standalone",
128128
parser=None,
@@ -137,9 +137,9 @@ def publish_string(
137137
): ...
138138
def publish_parts(
139139
source,
140-
source_path: FileInput | StringInput | None = None,
140+
source_path: StrPath | None = None,
141141
source_class=...,
142-
destination_path: FileInput | StringInput | None = None,
142+
destination_path: StrPath | None = None,
143143
reader=None,
144144
reader_name: str = "standalone",
145145
parser=None,
@@ -154,7 +154,7 @@ def publish_parts(
154154
) -> _WriterParts: ...
155155
def publish_doctree(
156156
source,
157-
source_path: FileInput | StringInput | None = None,
157+
source_path: StrPath | None = None,
158158
source_class=...,
159159
reader=None,
160160
reader_name: str = "standalone",
@@ -168,7 +168,7 @@ def publish_doctree(
168168
): ...
169169
def publish_from_doctree(
170170
document,
171-
destination_path: FileInput | StringInput | None = None,
171+
destination_path: StrPath | None = None,
172172
writer=None,
173173
writer_name: str = "pseudoxml",
174174
settings=None,
@@ -198,10 +198,10 @@ def publish_cmdline_to_binary(
198198
def publish_programmatically(
199199
source_class: type[FileInput],
200200
source,
201-
source_path: FileInput | StringInput,
201+
source_path: StrPath | None,
202202
destination_class,
203203
destination,
204-
destination_path: FileInput | StringInput,
204+
destination_path: StrPath | None,
205205
reader,
206206
reader_name: str,
207207
parser,

0 commit comments

Comments
 (0)