Skip to content

Commit

Permalink
docs: Update docstring for platform specific return class
Browse files Browse the repository at this point in the history
  • Loading branch information
r-leyshon committed Sep 19, 2023
1 parent 789870e commit 902061e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/transport_performance/utils/defence.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def _handle_path_like(
pth: Union[str, pathlib.Path, pathlib.PosixPath], param_nm: str
) -> pathlib.PosixPath:
) -> pathlib.Path:
"""Handle path-like parameter values.
Checks a path for symlinks and relative paths. Converts to realpath &
Expand All @@ -30,7 +30,9 @@ def _handle_path_like(
Returns
-------
pathlib.Path
Platform agnostic representation of pth.
Platform agnostic representation of pth. On unix-like a PosixPath is
returned. On windows a WindowsPath is returned. Both are children of
pathlib.Path.
"""
if not isinstance(pth, (str, pathlib.Path, pathlib.PosixPath)):
Expand Down

0 comments on commit 902061e

Please sign in to comment.