From cb57423adecd319747bdd0767a61b8e73c254811 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Fri, 10 Jan 2025 14:08:29 +0000 Subject: [PATCH] remove os Signed-off-by: Ankita Katiyar --- docs/source/conf.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8505e15382..6ea039479b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -539,7 +539,6 @@ def setup(app): def linkcode_resolve(domain, info): """Resolve a GitHub URL corresponding to Python object.""" - import os if domain != 'py': return None @@ -568,5 +567,4 @@ def linkcode_resolve(domain, info): return None return 'https://github.com/kedro-org/kedro/blob/main/kedro/%s#L%d#L%d' % ( - os.path.relpath(filename, start=os.path.dirname( - kedro.__file__)), lineno, lineno + len(source) - 1) + Path(filename).relative_to(Path(kedro.__file__).parent), lineno, lineno + len(source) - 1)