From ac72fb13315af418b48170073c2ee4caee237158 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 16 Sep 2024 01:14:52 +0200 Subject: [PATCH] doc/add_url_path --- spcd/util.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spcd/util.py b/spcd/util.py index 2f8a7ab..73a5309 100644 --- a/spcd/util.py +++ b/spcd/util.py @@ -12,7 +12,15 @@ from spcd.shell import env def add_url_path(url: str, extra_path: str) -> str: - """Append an extra segment to an existing URL.""" + """Append an extra segment to an existing URL. + + :param url: base URL + :type url: str + :param extra_path: path to append + :type extra_path: str + :return: new URL + :rtype: str + """ parts = urlparse(url) parts = parts._replace(path=str(Path(parts.path) / extra_path)) return urlunparse(parts)