Compare commits

...

3 Commits

Author SHA1 Message Date
Zanie
c9b305e9ca Fix clippy lint without changing pattern 2023-07-15 09:00:15 -05:00
harupy
d898ffaf7a Fix clippy error 2023-07-15 20:29:12 +09:00
harupy
f0567032d3 Ignore directories when collecting files to lint 2023-07-15 20:17:27 +09:00

View File

@@ -330,9 +330,12 @@ pub fn python_files_in_path(
}
if result.as_ref().map_or(true, |entry| {
if entry.depth() == 0 {
// Ignore directories
if entry.file_type().map_or(true, |ft| ft.is_dir()) {
false
} else if entry.depth() == 0 {
// Accept all files that are passed-in directly.
entry.file_type().map_or(false, |ft| ft.is_file())
true
} else {
// Otherwise, check if the file is included.
let path = entry.path();