Skip to content

Commit b49f668

Browse files
committed
clippy fix
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
1 parent 923b088 commit b49f668

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,17 @@ impl RuntimeInformation {
112112
diagnostic.info(format_args!(
113113
"Also used at runtime in {} other locations",
114114
self.count - 1
115-
))
115+
));
116116
}
117117
}
118118
}
119119

120+
type ImportAction<'a> = Vec<(ImportBinding<'a>, Option<RuntimeInformation>)>;
121+
120122
/// TC004
121123
pub(crate) fn runtime_import_in_type_checking_block(checker: &Checker, scope: &Scope) {
122124
// Collect all runtime imports by statement.
123-
let mut actions: FxHashMap<(NodeId, Action), Vec<(ImportBinding, Option<RuntimeInformation>)>> =
124-
FxHashMap::default();
125+
let mut actions: FxHashMap<(NodeId, Action), ImportAction> = FxHashMap::default();
125126

126127
// If we have a module-level __getattr__ method we don't necessarily know that the
127128
// references in __all__ refer to typing-only imports, the __getattr__ might be

0 commit comments

Comments
 (0)