From f7fc702b2c5edbecf8c29510a2ec61ae05738a2a Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 20 Sep 2022 17:53:52 -0700 Subject: [PATCH] Include specified files, even if they lack a .py[i] extension (#238) --- src/fs.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fs.rs b/src/fs.rs index 5d61701617..7b27603114 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -107,8 +107,7 @@ pub fn iter_python_files<'a>( }) .filter_map(|entry| entry.ok()) .filter(|entry| { - let path = entry.path(); - is_included(path) + (entry.depth() == 0 && !entry.file_type().is_dir()) || is_included(entry.path()) }) }