mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
Fill-in missing implementation for is_native_module_file_name
(#5410)
## Summary This was just an oversight -- the last remaining `todo!()` that I never filled in. We clearly don't have any test coverage for it yet, but this mimics the Pyright implementation.
This commit is contained in:
parent
979049b2a6
commit
ea7bb199bc
3 changed files with 86 additions and 23 deletions
|
@ -64,12 +64,7 @@ pub(crate) fn find(dir_path: &Path, exclusions: &[&Path]) -> BTreeMap<String, Im
|
|||
.exists()
|
||||
{
|
||||
// E.g., `foo.abi3.so` becomes `foo`.
|
||||
let file_stem = path
|
||||
.file_stem()
|
||||
.and_then(OsStr::to_str)
|
||||
.and_then(|file_stem| {
|
||||
file_stem.split_once('.').map(|(file_stem, _)| file_stem)
|
||||
});
|
||||
let file_stem = native_module::native_module_name(&path);
|
||||
let is_native_lib = true;
|
||||
(file_stem, is_native_lib)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue