From 0c7b89329b14113b9e49d04f3721b50f7c483ed1 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sun, 21 Jan 2024 23:30:03 -0500 Subject: [PATCH] Correction --- src/pythonfinder/models/python.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pythonfinder/models/python.py b/src/pythonfinder/models/python.py index fe12a5c..40f0d39 100644 --- a/src/pythonfinder/models/python.py +++ b/src/pythonfinder/models/python.py @@ -525,11 +525,8 @@ def from_path( path_name = getattr(path, "name", path_obj.name) path_str = path.path.absolute().as_posix() elif isinstance(path, PythonFinder): # If path is a PythonFinder object - path_obj = path.path # Assuming PythonFinder has a path attribute - path_name = getattr(path, "name", path_obj.name) - path_str = ( - path.path.absolute().as_posix() - ) # Assuming PythonFinder has a path attribute + path_name = None + path_str = path.path else: raise ValueError( f"Invalid path type: {type(path)}. Expected str, PathEntry, or PythonFinder."