143143"""
144144
145145
146- def append (var : str , filename : PathLike , ** kwargs ) -> int :
146+ def append (var : str , filename : PathLike , ** kwargs ) -> int : # noqa: PRM002
147147 """
148148 Append ``var`` to the file ``filename`` in the current directory.
149149
@@ -205,7 +205,7 @@ def copytree(
205205 return dst
206206
207207
208- def delete (filename : PathLike , ** kwargs ):
208+ def delete (filename : PathLike , ** kwargs ): # noqa: PRM002
209209 """
210210 Delete the file in the current directory.
211211
@@ -261,7 +261,7 @@ def parent_path(path: PathLike) -> pathlib.Path:
261261 return path .parent
262262
263263
264- def read (filename : PathLike , ** kwargs ) -> str :
264+ def read (filename : PathLike , ** kwargs ) -> str : # noqa: PRM002
265265 """
266266 Read a file in the current directory (in text mode).
267267
@@ -308,7 +308,7 @@ def relpath(path: PathLike, relative_to: Optional[PathLike] = None) -> pathlib.P
308308 return abs_path
309309
310310
311- def write (var : str , filename : PathLike , ** kwargs ) -> None :
311+ def write (var : str , filename : PathLike , ** kwargs ) -> None : # noqa: PRM002
312312 """
313313 Write a variable to file in the current directory.
314314
@@ -518,7 +518,7 @@ def write_lines(
518518 encoding : Optional [str ] = "UTF-8" ,
519519 errors : Optional [str ] = None ,
520520 * ,
521- trailing_whitespace : bool = False
521+ trailing_whitespace : bool = False ,
522522 ) -> None :
523523 """
524524 Write the given list of lines to the file without trailing whitespace.
@@ -536,7 +536,7 @@ def write_lines(
536536 if isinstance (data , str ):
537537 warnings .warn (
538538 "Passing a string to PathPlus.write_lines writes each character to its own line.\n "
539- "That probably isn't what you intended."
539+ "That probably isn't what you intended." ,
540540 )
541541
542542 if trailing_whitespace :
@@ -592,7 +592,7 @@ def open( # type: ignore # noqa: A003 # pylint: disable=redefined-builtin
592592 encoding : Optional [str ] = "UTF-8" ,
593593 errors : Optional [str ] = None ,
594594 newline : Optional [str ] = NEWLINE_DEFAULT ,
595- ) -> IO [Any ]:
595+ ) -> IO [Any ]:
596596 """
597597 Open the file pointed by this path and return a file object, as
598598 the built-in :func:`open` function does.
@@ -790,6 +790,8 @@ def unlink(self, missing_ok: bool = False) -> None:
790790
791791 If the path is a directory, use :meth:`~domdf_python_tools.paths.PathPlus.rmdir()` instead.
792792
793+ :param missing_ok:
794+
793795 .. versionadded:: 0.3.8 for Python 3.8 and above
794796 .. versionadded:: 0.11.0 for Python 3.6 and Python 3.7
795797 """
@@ -1125,6 +1127,10 @@ class TemporaryPathPlus(tempfile.TemporaryDirectory):
11251127
11261128 Unlike :func:`tempfile.TemporaryDirectory` this class is based around a :class:`~.PathPlus` object.
11271129
1130+ :param suffix: A str suffix for the directory name.
1131+ :param prefix: A str prefix for the directory name.
1132+ :param dir: A directory to create this temp dir in.
1133+
11281134 .. versionadded:: 2.4.0
11291135 .. autosummary-widths:: 6/16
11301136 """
@@ -1170,12 +1176,12 @@ def __enter__(self) -> PathPlus:
11701176
11711177
11721178def sort_paths (* paths : PathLike ) -> List [PathPlus ]:
1173- """
1179+ r """
11741180 Sort the ``paths`` by directory, then by file.
11751181
11761182 .. versionadded:: 2.6.0
11771183
1178- :param paths:
1184+ :param \* paths:
11791185 """
11801186
11811187 directories : Dict [str , List [PathPlus ]] = defaultdict (list )
@@ -1259,7 +1265,7 @@ def phase4(self) -> None: # noqa: D102
12591265 "left_only" : filecmp .dircmp .phase1 ,
12601266 "right_only" : filecmp .dircmp .phase1 ,
12611267 "left_list" : filecmp .dircmp .phase0 ,
1262- "right_list" : filecmp .dircmp .phase0
1268+ "right_list" : filecmp .dircmp .phase0 ,
12631269 }
12641270
12651271 methodmap = _methodmap # type: ignore[assignment]
0 commit comments