mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:18 +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
|
@ -7,8 +7,8 @@ use crate::suppression::{INVALID_IGNORE_COMMENT, UNKNOWN_RULE, UNUSED_IGNORE_COM
|
|||
pub use db::Db;
|
||||
pub use module_name::ModuleName;
|
||||
pub use module_resolver::{
|
||||
Module, SearchPathValidationError, SearchPaths, resolve_module, resolve_real_module,
|
||||
system_module_search_paths,
|
||||
Module, SearchPath, SearchPathValidationError, SearchPaths, list_modules, resolve_module,
|
||||
resolve_real_module, system_module_search_paths,
|
||||
};
|
||||
pub use program::{
|
||||
Program, ProgramSettings, PythonVersionFileSource, PythonVersionSource,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue