Skip to content

Commit

Permalink
[ruff F401 #10390 #10391] rename to_explicit -> to_reexport
Browse files Browse the repository at this point in the history
  • Loading branch information
plredmond committed Apr 30, 2024
1 parent 76608fe commit 50d37b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ pub(crate) fn unused_import(checker: &Checker, scope: &Scope, diagnostics: &mut
});

// generate fixes that are shared across bindings in the statement
let (fix_remove, fix_explicit) = if (!in_init || fix_init) && !in_except_handler {
let (fix_remove, fix_reexport) = if (!in_init || fix_init) && !in_except_handler {
(
fix_by_removing_imports(checker, import_statement, &to_remove, in_init).ok(),
fix_by_reexporting(checker, import_statement, &to_explicit, dunder_all).ok(),
Expand All @@ -255,7 +255,7 @@ pub(crate) fn unused_import(checker: &Checker, scope: &Scope, diagnostics: &mut

for ((binding, context), fix) in iter::Iterator::chain(
iter::zip(to_remove, iter::repeat(fix_remove)),
iter::zip(to_explicit, iter::repeat(fix_explicit)),
iter::zip(to_reexport, iter::repeat(fix_reexport)),
) {
let mut diagnostic = Diagnostic::new(
UnusedImport {
Expand Down

0 comments on commit 50d37b6

Please sign in to comment.