[ty] Add "list modules" implementation
The actual implementation wasn't too bad. It's not long but pretty fiddly. I copied over the tests from the existing module resolver and adapted them to work with this API. Then I added a number of my own tests as well.
This commit is contained in:
committed by
Andrew Gallant
parent
ec7c2efef9
commit
4db20f459c
1675
crates/ty_python_semantic/src/module_resolver/list.rs
Normal file
1675
crates/ty_python_semantic/src/module_resolver/list.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
use std::iter::FusedIterator;
|
||||
|
||||
pub use list::list_modules;
|
||||
pub(crate) use module::KnownModule;
|
||||
pub use module::Module;
|
||||
pub use path::SearchPathValidationError;
|
||||
@@ -12,6 +13,7 @@ use crate::Db;
|
||||
use crate::module_resolver::resolver::{ModuleResolveMode, search_paths};
|
||||
use resolver::SearchPathIterator;
|
||||
|
||||
mod list;
|
||||
mod module;
|
||||
mod path;
|
||||
mod resolver;
|
||||
|
||||
Reference in New Issue
Block a user