Add exclude support to ruff analyze (#13425)

## Summary

Closes https://github.com/astral-sh/ruff/issues/13424.
This commit is contained in:
Charlie Marsh 2024-09-20 15:34:35 -04:00 committed by GitHub
parent 149fb2090e
commit 910fac781d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 108 additions and 9 deletions

View file

@ -23,10 +23,10 @@ pub struct ModuleImports(BTreeSet<SystemPathBuf>);
impl ModuleImports {
/// Detect the [`ModuleImports`] for a given Python file.
pub fn detect(
db: &ModuleDb,
path: &SystemPath,
package: Option<&SystemPath>,
string_imports: bool,
db: &ModuleDb,
) -> Result<Self> {
// Read and parse the source code.
let file = system_path_to_file(db, path)?;