Minor nits on reference names (#3786)

This commit is contained in:
Charlie Marsh 2023-03-28 18:18:19 -04:00 committed by GitHub
parent 22d5b0071d
commit f322bcd2bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -89,7 +89,7 @@ impl<'a> Checker<'a> {
package: Option<&'a Path>,
module_path: Option<Vec<String>>,
locator: &'a Locator,
style: &'a Stylist,
stylist: &'a Stylist,
indexer: &'a Indexer,
) -> Checker<'a> {
Checker {
@ -102,13 +102,13 @@ impl<'a> Checker<'a> {
module_path: module_path.clone(),
is_stub: is_python_stub_file(path),
locator,
stylist: style,
stylist,
indexer,
ctx: Context::new(&settings.typing_modules, path, module_path),
deferred: Deferred::default(),
diagnostics: vec![],
diagnostics: Vec::default(),
deletions: FxHashSet::default(),
flake8_bugbear_seen: vec![],
flake8_bugbear_seen: Vec::default(),
}
}
}

View File

@ -29,9 +29,7 @@ pub fn check_imports(
// Extract all imports from the AST.
let tracker = {
let mut tracker = ImportTracker::new(locator, directives, path);
for stmt in python_ast {
tracker.visit_stmt(stmt);
}
tracker.visit_body(python_ast);
tracker
};
let blocks: Vec<&Block> = tracker.iter().collect();