From faa0b699973f8b6d57a0d4a865bf05c1de07b118 Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Wed, 3 Jan 2024 15:56:00 +1100 Subject: [PATCH] Refactoring --- rope/contrib/autoimport/sqlite.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rope/contrib/autoimport/sqlite.py b/rope/contrib/autoimport/sqlite.py index 563cebd63..3d5d35977 100644 --- a/rope/contrib/autoimport/sqlite.py +++ b/rope/contrib/autoimport/sqlite.py @@ -540,8 +540,7 @@ def filter_folders(folder: Path) -> bool: return folder.is_dir() and folder.as_posix() != "/usr/bin" folders = self.project.get_python_path_folders() - folder_paths = map(lambda folder: Path(folder.real_path), folders) - folder_paths = filter(filter_folders, folder_paths) # type:ignore + folder_paths = filter(filter_folders, map(Path, folders)) return list(OrderedDict.fromkeys(folder_paths)) def _safe_iterdir(self, folder: Path):