mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:44:56 +00:00
[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:
parent
ec7c2efef9
commit
4db20f459c
3 changed files with 1679 additions and 2 deletions
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue