mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-26 13:24:23 +00:00
Remove all unwrap
calls from the resolver (#5426)
This commit is contained in:
parent
4d90a5a9bc
commit
864f50a3a4
4 changed files with 47 additions and 50 deletions
|
@ -55,14 +55,7 @@ pub(crate) fn find(dir_path: &Path, exclusions: &[&Path]) -> BTreeMap<String, Im
|
|||
let file_stem = path.file_stem().and_then(OsStr::to_str);
|
||||
let is_native_lib = false;
|
||||
(file_stem, is_native_lib)
|
||||
} else if native_module::is_native_module_file_extension(extension)
|
||||
&& !path
|
||||
.with_extension(format!("{}.py", extension.to_str().unwrap()))
|
||||
.exists()
|
||||
&& !path
|
||||
.with_extension(format!("{}.pyi", extension.to_str().unwrap()))
|
||||
.exists()
|
||||
{
|
||||
} else if native_module::is_native_module_file_extension(extension) {
|
||||
// E.g., `foo.abi3.so` becomes `foo`.
|
||||
let file_stem = native_module::native_module_name(&path);
|
||||
let is_native_lib = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue