diff --git a/src/mandr/infomander.py b/src/mandr/infomander.py index 37154013..b9d9cf19 100644 --- a/src/mandr/infomander.py +++ b/src/mandr/infomander.py @@ -27,7 +27,26 @@ def _get_storage_path() -> Path: class InfoMander: """Represents a dictionary, on disk, with a path-like structure.""" - def __init__(self, path): + def __init__(self, path: Path | str) -> None: + """ + Initialize an `InfoMander`. + + Parameters + ---------- + path : path-like + The path of the `InfoMander` on the filesystem. + If given a relative path (i.e. does not start with '/'), then the resulting + path will be relative to the root storage path, which by default is + `/.datamander`. + + Examples + -------- + >>> InfoMander("hello") + InfoMander(.datamander/hello) + + >>> InfoMander("/hello") + InfoMander(/hello) + """ # Set local disk paths self.path = path self.project_path = _get_storage_path() / path