1
- from _typeshed import Incomplete
1
+ from _typeshed import Incomplete , StrPath
2
2
from typing import Final
3
3
from typing_extensions import deprecated
4
4
5
5
from docutils import SettingsSpec
6
6
from docutils .frontend import OptionParser
7
- from docutils .io import FileInput , Input , Output , StringInput
7
+ from docutils .io import FileInput , Input , Output
8
8
from docutils .parsers import Parser
9
9
from docutils .readers import Reader
10
10
from docutils .utils import SystemMessage
@@ -63,9 +63,9 @@ class Publisher:
63
63
config_section = None ,
64
64
** defaults ,
65
65
) -> 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 : ...
69
69
def apply_transforms (self ) -> None : ...
70
70
def publish (
71
71
self ,
@@ -104,9 +104,9 @@ def publish_cmdline(
104
104
): ...
105
105
def publish_file (
106
106
source = None ,
107
- source_path : FileInput | StringInput | None = None ,
107
+ source_path : StrPath | None = None ,
108
108
destination = None ,
109
- destination_path : FileInput | StringInput | None = None ,
109
+ destination_path : StrPath | None = None ,
110
110
reader = None ,
111
111
reader_name : str = "standalone" ,
112
112
parser = None ,
@@ -121,8 +121,8 @@ def publish_file(
121
121
): ...
122
122
def publish_string (
123
123
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 ,
126
126
reader = None ,
127
127
reader_name : str = "standalone" ,
128
128
parser = None ,
@@ -137,9 +137,9 @@ def publish_string(
137
137
): ...
138
138
def publish_parts (
139
139
source ,
140
- source_path : FileInput | StringInput | None = None ,
140
+ source_path : StrPath | None = None ,
141
141
source_class = ...,
142
- destination_path : FileInput | StringInput | None = None ,
142
+ destination_path : StrPath | None = None ,
143
143
reader = None ,
144
144
reader_name : str = "standalone" ,
145
145
parser = None ,
@@ -154,7 +154,7 @@ def publish_parts(
154
154
) -> _WriterParts : ...
155
155
def publish_doctree (
156
156
source ,
157
- source_path : FileInput | StringInput | None = None ,
157
+ source_path : StrPath | None = None ,
158
158
source_class = ...,
159
159
reader = None ,
160
160
reader_name : str = "standalone" ,
@@ -168,7 +168,7 @@ def publish_doctree(
168
168
): ...
169
169
def publish_from_doctree (
170
170
document ,
171
- destination_path : FileInput | StringInput | None = None ,
171
+ destination_path : StrPath | None = None ,
172
172
writer = None ,
173
173
writer_name : str = "pseudoxml" ,
174
174
settings = None ,
@@ -198,10 +198,10 @@ def publish_cmdline_to_binary(
198
198
def publish_programmatically (
199
199
source_class : type [FileInput ],
200
200
source ,
201
- source_path : FileInput | StringInput ,
201
+ source_path : StrPath | None ,
202
202
destination_class ,
203
203
destination ,
204
- destination_path : FileInput | StringInput ,
204
+ destination_path : StrPath | None ,
205
205
reader ,
206
206
reader_name : str ,
207
207
parser ,
0 commit comments