From 69822173d44023f0e1b95404b9547b42804e36f9 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 9 Jun 2022 15:22:09 +0200 Subject: [PATCH] pathresolver.py : rtype and function doc (part) --- src/bootstraparse/modules/pathresolver.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bootstraparse/modules/pathresolver.py b/src/bootstraparse/modules/pathresolver.py index 51c166a..4ab0914 100644 --- a/src/bootstraparse/modules/pathresolver.py +++ b/src/bootstraparse/modules/pathresolver.py @@ -12,16 +12,21 @@ import os class PathResolver: """ Initialised with a relative path and returns the translated absolute path - :param base_path: Relative path to be resolved """ def __init__(self, base_path): + """ + Initialises the PathResolver with the base path + :param base_path: Base path + :type base_path: str + """ self.base_path = os.path.normpath(os.path.join(os.getcwd(), os.path.dirname(base_path))) def __call__(self, relative_path='.'): """ Returns the absolute path of the relative path :param relative_path: Relative path to be resolved + :type relative_path: str :return: Absolute path """ return self.give_absolute(relative_path) @@ -30,6 +35,7 @@ class PathResolver: """ Returns the absolute path of the relative path :param relative_path: Relative path to be resolved + :type relative_path: str :return: Absolute path """ return os.path.normpath(os.path.join(self.base_path, relative_path))