Skip to content

Commit 2f8ac1e

Browse files
Fix red-knot compilation (#11727)
## Summary Perhaps a result of a bad rebase, but `cargo clippy --fix --workspace --all-targets -- -D warnings` does not pass on main as-is.
1 parent 3fb2028 commit 2f8ac1e

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

crates/red_knot/src/types/infer.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,16 @@ fn infer_expr_type(db: &dyn SemanticDb, file_id: FileId, expr: &ast::Expr) -> Qu
213213

214214
#[cfg(test)]
215215
mod tests {
216+
use textwrap::dedent;
217+
216218
use crate::db::tests::TestDb;
217219
use crate::db::{HasJar, SemanticJar};
218220
use crate::module::{
219-
set_module_search_paths, ModuleName, ModuleSearchPath, ModuleSearchPathKind,
221+
resolve_module, set_module_search_paths, ModuleName, ModuleSearchPath, ModuleSearchPathKind,
220222
};
221-
use crate::symbols::resolve_global_symbol;
223+
use crate::symbols::{resolve_global_symbol, symbol_table, GlobalSymbolId};
222224
use crate::types::{infer_symbol_public_type, Type};
223225
use crate::Name;
224-
use textwrap::dedent;
225226

226227
// TODO with virtual filesystem we shouldn't have to write files to disk for these
227228
// tests
@@ -388,15 +389,6 @@ mod tests {
388389
assert_public_type(&case, "a", "x", "(Literal[1] | Literal[2])")
389390
}
390391

391-
#[test]
392-
fn resolve_visible_def() -> anyhow::Result<()> {
393-
let case = create_test()?;
394-
395-
write_to_path(&case, "a.py", "y = 1; y = 2; x = y")?;
396-
397-
assert_public_type(&case, "a", "x", "Literal[2]")
398-
}
399-
400392
#[test]
401393
fn resolve_visible_def() -> anyhow::Result<()> {
402394
let case = create_test()?;

0 commit comments

Comments
 (0)