From 8b730c7710b05458d2ff492d39df3647005f7210 Mon Sep 17 00:00:00 2001 From: sachindavra Date: Wed, 9 Jun 2021 16:21:57 +0530 Subject: [PATCH] 28-fix-pathlib-Path-glob --- d8s_python/python_data.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/d8s_python/python_data.py b/d8s_python/python_data.py index 5ae150a..6bc29dc 100644 --- a/d8s_python/python_data.py +++ b/d8s_python/python_data.py @@ -250,9 +250,12 @@ def python_copy_shallow(python_object: Any) -> Any: # @decorators.map_first_arg def python_file_names(path: str, *, exclude_tests: bool = False) -> List[str]: # noqa: CCR001 """Find all python files in the given directory.""" - from d8s_file_system import directory_file_names_matching + # from d8s_file_system import directory_file_names_matching + # + # files = directory_file_names_matching(path, '*.py') + from pathlib import Path - files = directory_file_names_matching(path, '*.py') + files = Path(path).glob('*.py') if not exclude_tests: return files