@@ -137,11 +137,13 @@ def maybe_make(directory: PathLike, mode: int = 0o777, parents: bool = False, ex
137
137
:param parents: If :py:obj:`False` (the default), a missing parent raises a :class:`~python:FileNotFoundError`.
138
138
If :py:obj:`True`, any missing parents of this path are created as needed; they are created with the
139
139
default permissions without taking mode into account (mimicking the POSIX mkdir -p command).
140
+ :no-default parents:
140
141
:type parents: bool, optional
141
142
:param exist_ok: If :py:obj:`False` (the default), a :class:`~python:FileExistsError` is raised if the
142
143
target directory already exists. If :py:obj:`True`, :class:`~python:FileExistsError` exceptions
143
144
will be ignored (same behavior as the POSIX mkdir -p command), but only if the last path
144
145
component is not an existing non-directory file.
146
+ :no-default exist_ok:
145
147
:type exist_ok: bool, optional
146
148
"""
147
149
@@ -194,7 +196,8 @@ def relpath(path: PathLike, relative_to: Optional[PathLike] = None) -> pathlib.P
194
196
195
197
:param path: Path to find the relative path for
196
198
:param relative_to: The directory to find the path relative to.
197
- Defaults to the current directory
199
+ Defaults to the current directory.
200
+ :no-default relative_to:
198
201
199
202
:return:
200
203
"""
@@ -312,8 +315,7 @@ def write_clean(
312
315
Open the file in text mode, write to it without trailing spaces, and close the file.
313
316
314
317
:param string:
315
- :type string: str
316
- :param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
318
+ :param encoding: The encoding to write to the file using.
317
319
:param errors:
318
320
319
321
.. versionadded:: 0.3.8
@@ -336,11 +338,13 @@ def maybe_make(
336
338
:param parents: If :py:obj:`False` (the default), a missing parent raises a :class:`~python:FileNotFoundError`.
337
339
If :py:obj:`True`, any missing parents of this path are created as needed; they are created with the
338
340
default permissions without taking mode into account (mimicking the POSIX mkdir -p command).
341
+ :no-default parents:
339
342
:type parents: bool, optional
340
343
:param exist_ok: If :py:obj:`False` (the default), a :class:`~python:FileExistsError` is raised if the
341
344
target directory already exists. If :py:obj:`True`, :class:`~python:FileExistsError` exceptions
342
345
will be ignored (same behavior as the POSIX mkdir -p command), but only if the last path
343
346
component is not an existing non-directory file.
347
+ :no-default exist_ok:
344
348
:type exist_ok: bool, optional
345
349
346
350
.. versionadded:: 0.3.8
@@ -359,7 +363,7 @@ def append_text(
359
363
360
364
:param string:
361
365
:type string: str
362
- :param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
366
+ :param encoding: The encoding to write to the file using.
363
367
:param errors:
364
368
365
369
.. versionadded:: 0.3.8
@@ -379,7 +383,7 @@ def write_text(
379
383
380
384
:param data:
381
385
:type data: str
382
- :param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
386
+ :param encoding: The encoding to write to the file using.
383
387
:param errors:
384
388
385
389
.. versionadded:: 0.3.8
@@ -395,7 +399,7 @@ def read_text(
395
399
"""
396
400
Open the file in text mode, read it, and close the file.
397
401
398
- :param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
402
+ :param encoding: The encoding to write to the file using.
399
403
:param errors:
400
404
401
405
:return: The content of the file.
@@ -417,7 +421,8 @@ def open(
417
421
Open the file pointed by this path and return a file object, as
418
422
the built-in open() function does.
419
423
420
- :param mode: The mode to open the file in. Default ``"r"`` (read only.
424
+ :param mode: The mode to open the file in.
425
+ :default mode: ``"r"`` (read only)
421
426
:type mode: str
422
427
:param buffering:
423
428
:type buffering: int
0 commit comments