Flesh out the docstring for validate_path

This commit is contained in:
Dave Pearson
2023-05-03 09:02:49 +01:00
parent e4c0517cc6
commit d1d435d68b

View File

@@ -114,7 +114,18 @@ class DirectoryTree(Tree[DirEntry]):
)
def validate_path(self, path: str | Path) -> Path:
"""Ensure that the path is of the `Path` type."""
"""Ensure that the path is of the `Path` type.
Args:
path: The path to validate.
Returns:
The validated Path value.
Note:
The result will always be a Python `Path` object, regardless of
the value given.
"""
return Path(path)
def watch_path(self, new_path: str | Path) -> None: