mirror of
https://github.com/astral-sh/ruff.git
synced 2025-12-23 09:19:39 +00:00
Fix clippy lint without changing pattern
This commit is contained in:
parent
d898ffaf7a
commit
c9b305e9ca
1 changed files with 4 additions and 6 deletions
|
|
@ -329,12 +329,11 @@ pub fn python_files_in_path(
|
|||
}
|
||||
}
|
||||
|
||||
let should_include = result.as_ref().map_or(true, |entry| {
|
||||
if result.as_ref().map_or(true, |entry| {
|
||||
// Ignore directories
|
||||
if entry.file_type().map_or(true, |ft| ft.is_dir()) {
|
||||
return false;
|
||||
}
|
||||
if entry.depth() == 0 {
|
||||
false
|
||||
} else if entry.depth() == 0 {
|
||||
// Accept all files that are passed-in directly.
|
||||
true
|
||||
} else {
|
||||
|
|
@ -352,8 +351,7 @@ pub fn python_files_in_path(
|
|||
false
|
||||
}
|
||||
}
|
||||
});
|
||||
if should_include {
|
||||
}) {
|
||||
files.lock().unwrap().push(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue