diff --git a/Cargo.lock b/Cargo.lock index 79580e37b0c3f..efb58028dd4cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2332,6 +2332,7 @@ dependencies = [ "red_knot_server", "regex", "ruff_db", + "ruff_python_trivia", "salsa", "tempfile", "toml", diff --git a/crates/red_knot/Cargo.toml b/crates/red_knot/Cargo.toml index 5bc5c89c3e235..805bf194838d5 100644 --- a/crates/red_knot/Cargo.toml +++ b/crates/red_knot/Cargo.toml @@ -33,6 +33,7 @@ tracing-tree = { workspace = true } [dev-dependencies] ruff_db = { workspace = true, features = ["testing"] } +ruff_python_trivia = { workspace = true } insta = { workspace = true, features = ["filters"] } insta-cmd = { workspace = true } diff --git a/crates/red_knot/tests/.cli.rs.pending-snap b/crates/red_knot/tests/.cli.rs.pending-snap new file mode 100644 index 0000000000000..2fa4a6c25ec2b --- /dev/null +++ b/crates/red_knot/tests/.cli.rs.pending-snap @@ -0,0 +1,8 @@ +{"run_id":"1737625487-708900000","line":216,"new":{"module_name":"cli","snapshot_name":"unknown_rules","metadata":{"source":"crates/red_knot/tests/cli.rs","assertion_line":216,"info":{"program":"red_knot","args":[]}},"snapshot":"success: false\nexit_code: -1\n----- stdout -----\n\n----- stderr -----\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_deferred_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_deferred_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:279:13\n 19: ::inner_fn_name_::{{closure}}\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3785:30\n 20: core::iter::adapters::map::map_fold::{{closure}}\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:88:28\n 21: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:232:27\n 22: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:128:9\n 23: core::iter::traits::iterator::Iterator::for_each\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:800:9\n 24: alloc::vec::Vec::extend_trusted\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3553:17\n 25: as alloc::vec::spec_extend::SpecExtend>::spec_extend\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:29:9\n 26: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:62:9\n 27: as alloc::vec::spec_from_iter::SpecFromIter>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:34:9\n 28: as core::iter::traits::collect::FromIterator>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3412:9\n 29: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 30: alloc::boxed::iter:: for alloc::boxed::Box<[I]>>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed/iter.rs:144:9\n 31: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 32: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3782:9\n 33: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 34: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 35: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 36: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 37: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 38: ___rust_try\n 39: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 40: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 41: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 42: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 43: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 44: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 45: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 46: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 47: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 48: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 49: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 50: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 51: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 52: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 53: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 54: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 55: red_knot_python_semantic::types::Class::explicit_bases_query\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 56: red_knot_python_semantic::types::Class::explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3764:9\n 57: red_knot_python_semantic::types::Class::fully_static_explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3769:9\n 58: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3898:32\n 59: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 60: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 61: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 62: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 63: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 64: ___rust_try\n 65: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 66: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 67: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 68: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 69: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 70: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 71: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 72: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 73: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 74: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 75: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 76: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 77: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 78: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 79: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 80: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 81: red_knot_python_semantic::types::Class::try_metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 82: red_knot_python_semantic::types::Class::metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3890:9\n 83: red_knot_python_semantic::types::Type::to_meta_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2360:63\n 84: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3749:34\n 85: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3556:9\n 86: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2707:41\n 87: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 88: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_subscript_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4422:24\n 89: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2710:48\n 90: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 91: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_class_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1400:13\n 92: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:817:45\n 93: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:495:54\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:283:9\n 19: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4200:9\n 20: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 21: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 22: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 23: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 24: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 25: ___rust_try\n 26: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 27: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 28: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 29: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 30: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 31: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 32: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 33: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 34: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 35: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 36: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 37: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 38: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 39: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 40: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 41: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 42: red_knot_python_semantic::types::TypeAliasType::value_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4191:1\n 43: red_knot_python_semantic::types::Type::in_type_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2269:80\n 44: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4798:30\n 45: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4737:29\n 46: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_alias\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1007:9\n 47: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_scope\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:520:17\n 48: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:493:46\n 49: red_knot_python_semantic::types::infer::TypeInferenceBuilder::finish\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4721:9\n 50: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:104:5\n 51: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 52: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 53: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 54: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 55: ___rust_try\n 56: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 57: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 58: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 59: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 60: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 61: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 62: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 63: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 64: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 65: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 66: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 67: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 68: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 69: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 70: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 71: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 72: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:74:22\n 73: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 74: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 75: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 76: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 77: ___rust_try\n 78: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 79: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 80: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 81: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 82: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 83: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 84: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 85: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 86: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 87: red_knot_python_semantic::types::check_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 88: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 89: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 90: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 91: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 92: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 93: red_knot_python_semantic::types::check_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 94: red_knot_project::check_file_impl\n at /Users/micha/astral/ruff/crates/red_knot_project/src/lib.rs:327:24\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_deferred_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_deferred_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:279:13\n 19: ::inner_fn_name_::{{closure}}\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3785:30\n 20: core::iter::adapters::map::map_fold::{{closure}}\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:88:28\n 21: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:232:27\n 22: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:128:9\n 23: core::iter::traits::iterator::Iterator::for_each\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:800:9\n 24: alloc::vec::Vec::extend_trusted\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3553:17\n 25: as alloc::vec::spec_extend::SpecExtend>::spec_extend\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:29:9\n 26: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:62:9\n 27: as alloc::vec::spec_from_iter::SpecFromIter>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:34:9\n 28: as core::iter::traits::collect::FromIterator>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3412:9\n 29: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 30: alloc::boxed::iter:: for alloc::boxed::Box<[I]>>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed/iter.rs:144:9\n 31: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 32: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3782:9\n 33: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 34: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 35: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 36: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 37: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 38: ___rust_try\n 39: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 40: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 41: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 42: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 43: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 44: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 45: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 46: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 47: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 48: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 49: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 50: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 51: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 52: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 53: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 54: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 55: red_knot_python_semantic::types::Class::explicit_bases_query\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 56: red_knot_python_semantic::types::Class::explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3764:9\n 57: red_knot_python_semantic::types::Class::fully_static_explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3769:9\n 58: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3898:32\n 59: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 60: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 61: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 62: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 63: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 64: ___rust_try\n 65: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 66: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 67: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 68: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 69: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 70: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 71: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 72: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 73: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 74: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 75: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 76: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 77: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 78: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 79: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 80: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 81: red_knot_python_semantic::types::Class::try_metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 82: red_knot_python_semantic::types::Class::metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3890:9\n 83: red_knot_python_semantic::types::Type::to_meta_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2360:63\n 84: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3749:34\n 85: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3556:9\n 86: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2707:41\n 87: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 88: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_subscript_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4422:24\n 89: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2710:48\n 90: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 91: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_class_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1400:13\n 92: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:817:45\n 93: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:495:54\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:283:9\n 19: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4200:9\n 20: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 21: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 22: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 23: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 24: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 25: ___rust_try\n 26: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 27: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 28: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 29: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 30: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 31: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 32: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 33: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 34: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 35: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 36: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 37: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 38: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 39: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 40: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 41: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 42: red_knot_python_semantic::types::TypeAliasType::value_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4191:1\n 43: red_knot_python_semantic::types::Type::in_type_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2269:80\n 44: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_expression_no_store\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4957:43\n 45: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4922:18\n 46: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_expression_no_store\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:5007:39\n 47: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4892:26\n 48: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4737:29\n 49: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_string_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4908:17\n 50: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4764:49\n 51: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4737:29\n 52: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_alias\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1007:9\n 53: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_scope\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:520:17\n 54: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:493:46\n 55: red_knot_python_semantic::types::infer::TypeInferenceBuilder::finish\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4721:9\n 56: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:104:5\n 57: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 58: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 59: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 60: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 61: ___rust_try\n 62: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 63: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 64: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 65: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 66: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 67: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 68: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 69: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 70: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 71: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 72: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 73: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 74: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 75: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 76: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 77: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 78: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:74:22\n 79: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 80: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 81: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 82: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 83: ___rust_try\n 84: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 85: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 86: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 87: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 88: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 89: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 90: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 91: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 92: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 93: red_knot_python_semantic::types::check_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 94: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_deferred_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_deferred_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:279:13\n 19: ::inner_fn_name_::{{closure}}\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3785:30\n 20: core::iter::adapters::map::map_fold::{{closure}}\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:88:28\n 21: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:232:27\n 22: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:128:9\n 23: core::iter::traits::iterator::Iterator::for_each\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:800:9\n 24: alloc::vec::Vec::extend_trusted\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3553:17\n 25: as alloc::vec::spec_extend::SpecExtend>::spec_extend\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:29:9\n 26: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:62:9\n 27: as alloc::vec::spec_from_iter::SpecFromIter>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:34:9\n 28: as core::iter::traits::collect::FromIterator>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3412:9\n 29: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 30: alloc::boxed::iter:: for alloc::boxed::Box<[I]>>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed/iter.rs:144:9\n 31: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 32: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3782:9\n 33: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 34: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 35: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 36: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 37: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 38: ___rust_try\n 39: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 40: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 41: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 42: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 43: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 44: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 45: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 46: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 47: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 48: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 49: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 50: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 51: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 52: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 53: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 54: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 55: red_knot_python_semantic::types::Class::explicit_bases_query\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 56: red_knot_python_semantic::types::Class::explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3764:9\n 57: red_knot_python_semantic::types::Class::fully_static_explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3769:9\n 58: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3898:32\n 59: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 60: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 61: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 62: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 63: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 64: ___rust_try\n 65: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 66: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 67: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 68: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 69: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 70: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 71: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 72: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 73: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 74: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 75: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 76: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 77: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 78: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 79: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 80: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 81: red_knot_python_semantic::types::Class::try_metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 82: red_knot_python_semantic::types::Class::metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3890:9\n 83: red_knot_python_semantic::types::Type::to_meta_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2360:63\n 84: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3749:34\n 85: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3556:9\n 86: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2707:41\n 87: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 88: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_subscript_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4422:24\n 89: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2710:48\n 90: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 91: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_class_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1400:13\n 92: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:817:45\n 93: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:495:54\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nRayon: detected unexpected panic; aborting"},"old":{"module_name":"cli","metadata":{},"snapshot":"success: false\nexit_code: 1\n----- stdout -----\nwarning[unknown-rule] /pyproject.toml:3:1 Unknown lint rule `division-by-zer`\n\n----- stderr -----"}} +{"run_id":"1737625487-708900000","line":188,"new":{"module_name":"cli","snapshot_name":"rule_severity","metadata":{"source":"crates/red_knot/tests/cli.rs","assertion_line":188,"info":{"program":"red_knot","args":[]}},"snapshot":"success: false\nexit_code: -1\n----- stdout -----\n\n----- stderr -----\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:283:9\n 19: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4200:9\n 20: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 21: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 22: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 23: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 24: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 25: ___rust_try\n 26: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 27: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 28: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 29: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 30: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 31: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 32: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 33: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 34: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 35: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 36: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 37: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 38: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 39: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 40: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 41: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 42: red_knot_python_semantic::types::TypeAliasType::value_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4191:1\n 43: red_knot_python_semantic::types::Type::in_type_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2269:80\n 44: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_expression_no_store\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4957:43\n 45: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4922:18\n 46: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_expression_no_store\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:5007:39\n 47: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4892:26\n 48: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4737:29\n 49: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_string_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4908:17\n 50: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4764:49\n 51: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4737:29\n 52: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_alias\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1007:9\n 53: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_scope\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:520:17\n 54: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:493:46\n 55: red_knot_python_semantic::types::infer::TypeInferenceBuilder::finish\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4721:9\n 56: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:104:5\n 57: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 58: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 59: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 60: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 61: ___rust_try\n 62: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 63: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 64: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 65: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 66: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 67: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 68: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 69: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 70: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 71: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 72: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 73: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 74: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 75: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 76: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 77: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 78: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:74:22\n 79: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 80: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 81: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 82: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 83: ___rust_try\n 84: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 85: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 86: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 87: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 88: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 89: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 90: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 91: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 92: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 93: red_knot_python_semantic::types::check_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 94: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_deferred_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_deferred_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:279:13\n 19: ::inner_fn_name_::{{closure}}\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3785:30\n 20: core::iter::adapters::map::map_fold::{{closure}}\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:88:28\n 21: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:232:27\n 22: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:128:9\n 23: core::iter::traits::iterator::Iterator::for_each\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:800:9\n 24: alloc::vec::Vec::extend_trusted\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3553:17\n 25: as alloc::vec::spec_extend::SpecExtend>::spec_extend\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:29:9\n 26: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:62:9\n 27: as alloc::vec::spec_from_iter::SpecFromIter>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:34:9\n 28: as core::iter::traits::collect::FromIterator>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3412:9\n 29: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 30: alloc::boxed::iter:: for alloc::boxed::Box<[I]>>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed/iter.rs:144:9\n 31: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 32: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3782:9\n 33: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 34: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 35: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 36: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 37: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 38: ___rust_try\n 39: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 40: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 41: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 42: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 43: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 44: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 45: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 46: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 47: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 48: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 49: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 50: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 51: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 52: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 53: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 54: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 55: red_knot_python_semantic::types::Class::explicit_bases_query\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 56: red_knot_python_semantic::types::Class::explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3764:9\n 57: red_knot_python_semantic::types::Class::fully_static_explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3769:9\n 58: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3898:32\n 59: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 60: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 61: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 62: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 63: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 64: ___rust_try\n 65: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 66: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 67: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 68: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 69: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 70: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 71: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 72: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 73: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 74: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 75: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 76: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 77: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 78: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 79: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 80: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 81: red_knot_python_semantic::types::Class::try_metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 82: red_knot_python_semantic::types::Class::metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3890:9\n 83: red_knot_python_semantic::types::Type::to_meta_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2360:63\n 84: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3749:34\n 85: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3556:9\n 86: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2707:41\n 87: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 88: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_subscript_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4422:24\n 89: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2710:48\n 90: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 91: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_class_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1400:13\n 92: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:817:45\n 93: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:495:54\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_deferred_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_deferred_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:279:13\n 19: ::inner_fn_name_::{{closure}}\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3785:30\n 20: core::iter::adapters::map::map_fold::{{closure}}\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:88:28\n 21: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:232:27\n 22: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:128:9\n 23: core::iter::traits::iterator::Iterator::for_each\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:800:9\n 24: alloc::vec::Vec::extend_trusted\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3553:17\n 25: as alloc::vec::spec_extend::SpecExtend>::spec_extend\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:29:9\n 26: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:62:9\n 27: as alloc::vec::spec_from_iter::SpecFromIter>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:34:9\n 28: as core::iter::traits::collect::FromIterator>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3412:9\n 29: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 30: alloc::boxed::iter:: for alloc::boxed::Box<[I]>>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed/iter.rs:144:9\n 31: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 32: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3782:9\n 33: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 34: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 35: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 36: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 37: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 38: ___rust_try\n 39: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 40: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 41: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 42: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 43: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 44: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 45: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 46: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 47: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 48: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 49: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 50: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 51: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 52: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 53: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 54: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 55: red_knot_python_semantic::types::Class::explicit_bases_query\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 56: red_knot_python_semantic::types::Class::explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3764:9\n 57: red_knot_python_semantic::types::Class::fully_static_explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3769:9\n 58: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3898:32\n 59: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 60: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 61: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 62: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 63: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 64: ___rust_try\n 65: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 66: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 67: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 68: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 69: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 70: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 71: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 72: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 73: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 74: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 75: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 76: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 77: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 78: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 79: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 80: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 81: red_knot_python_semantic::types::Class::try_metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 82: red_knot_python_semantic::types::Class::metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3890:9\n 83: red_knot_python_semantic::types::Type::to_meta_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2360:63\n 84: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3749:34\n 85: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3556:9\n 86: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2707:41\n 87: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 88: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_subscript_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4422:24\n 89: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2710:48\n 90: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 91: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_class_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1400:13\n 92: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:817:45\n 93: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:495:54\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:283:9\n 19: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4200:9\n 20: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 21: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 22: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 23: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 24: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 25: ___rust_try\n 26: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 27: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 28: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 29: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 30: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 31: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 32: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 33: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 34: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 35: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 36: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 37: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 38: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 39: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 40: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 41: red_knot_python_semantic::types::TypeAliasType::value_ty::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 42: red_knot_python_semantic::types::TypeAliasType::value_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:4191:1\n 43: red_knot_python_semantic::types::Type::in_type_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2269:80\n 44: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4798:30\n 45: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_annotation_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4737:29\n 46: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_type_alias\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1007:9\n 47: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_scope\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:520:17\n 48: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:493:46\n 49: red_knot_python_semantic::types::infer::TypeInferenceBuilder::finish\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4721:9\n 50: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:104:5\n 51: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 52: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 53: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 54: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 55: ___rust_try\n 56: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 57: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 58: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 59: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 60: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 61: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 62: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 63: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 64: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 65: red_knot_python_semantic::types::infer::infer_scope_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 66: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 67: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 68: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 69: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 70: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 71: red_knot_python_semantic::types::infer::infer_scope_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 72: ::execute::inner_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:74:22\n 73: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 74: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 75: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 76: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 77: ___rust_try\n 78: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 79: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 80: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 81: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 82: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 83: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 84: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 85: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 86: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 87: red_knot_python_semantic::types::check_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 88: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 89: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 90: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 91: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 92: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 93: red_knot_python_semantic::types::check_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 94: red_knot_project::check_file_impl\n at /Users/micha/astral/ruff/crates/red_knot_project/src/lib.rs:327:24\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nthread '' panicked at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13:\nBox\nstack backtrace:\n 0: std::panicking::begin_panic\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:737:5\n 1: std::panic::panic_any\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:259:5\n 2: salsa::runtime::Runtime::unblock_cycle_and_maybe_throw\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:335:13\n 3: salsa::runtime::Runtime::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/runtime.rs:187:13\n 4: salsa::zalsa::Zalsa::block_on_or_unwind\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/zalsa.rs:290:9\n 5: salsa::table::sync::SyncTable::claim\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/table/sync.rs:71:17\n 6: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:69:28\n 7: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 8: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 9: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 10: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 11: red_knot_python_semantic::types::infer::infer_deferred_types::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 12: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 13: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 14: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 15: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 16: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 17: red_knot_python_semantic::types::infer::infer_deferred_types\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 18: red_knot_python_semantic::types::definition_expression_ty\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:279:13\n 19: ::inner_fn_name_::{{closure}}\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3785:30\n 20: core::iter::adapters::map::map_fold::{{closure}}\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:88:28\n 21: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:232:27\n 22: as core::iter::traits::iterator::Iterator>::fold\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:128:9\n 23: core::iter::traits::iterator::Iterator::for_each\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:800:9\n 24: alloc::vec::Vec::extend_trusted\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3553:17\n 25: as alloc::vec::spec_extend::SpecExtend>::spec_extend\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:29:9\n 26: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:62:9\n 27: as alloc::vec::spec_from_iter::SpecFromIter>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:34:9\n 28: as core::iter::traits::collect::FromIterator>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3412:9\n 29: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 30: alloc::boxed::iter:: for alloc::boxed::Box<[I]>>::from_iter\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed/iter.rs:144:9\n 31: core::iter::traits::iterator::Iterator::collect\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9\n 32: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3782:9\n 33: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 34: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 35: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 36: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 37: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 38: ___rust_try\n 39: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 40: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 41: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 42: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 43: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 44: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 45: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 46: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 47: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 48: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 49: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 50: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 51: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 52: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 53: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 54: red_knot_python_semantic::types::Class::explicit_bases_query::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 55: red_knot_python_semantic::types::Class::explicit_bases_query\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 56: red_knot_python_semantic::types::Class::explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3764:9\n 57: red_knot_python_semantic::types::Class::fully_static_explicit_bases\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3769:9\n 58: ::inner_fn_name_\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3898:32\n 59: ::execute::inner_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_method_body.rs:34:17\n 60: ::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:177:21\n 61: salsa::function::execute::>::execute::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:43\n 62: as core::ops::function::FnOnce<()>>::call_once\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9\n 63: std::panicking::try::do_call\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40\n 64: ___rust_try\n 65: std::panicking::try\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19\n 66: std::panic::catch_unwind\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14\n 67: salsa::cycle::Cycle::catch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/cycle.rs:43:15\n 68: salsa::function::execute::>::execute\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/execute.rs:51:27\n 69: salsa::function::fetch::>::fetch_cold\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:91:14\n 70: salsa::function::fetch::>::refresh_memo::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:67\n 71: core::option::Option::or_else\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1546:21\n 72: salsa::function::fetch::>::refresh_memo\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:41:33\n 73: salsa::function::fetch::>::fetch\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/function/fetch.rs:13:20\n 74: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:292:25\n 75: salsa::attach::Attached::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:71:9\n 76: salsa::attach::attach::{{closure}}\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:23\n 77: std::thread::local::LocalKey::try_with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12\n 78: std::thread::local::LocalKey::with\n at /Users/micha/.rustup/toolchains/1.84-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9\n 79: salsa::attach::attach\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/src/attach.rs:91:5\n 80: red_knot_python_semantic::types::Class::try_metaclass::inner_fn_name_\n at /Users/micha/.cargo/git/checkouts/salsa-61760caba2b17ca5/88a1d77/components/salsa-macro-rules/src/setup_tracked_fn.rs:284:13\n 81: red_knot_python_semantic::types::Class::try_metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3743:1\n 82: red_knot_python_semantic::types::Class::metaclass\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:3890:9\n 83: red_knot_python_semantic::types::Type::to_meta_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types.rs:2360:63\n 84: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression_type\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3749:34\n 85: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_binary_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:3556:9\n 86: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2707:41\n 87: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 88: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_subscript_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:4422:24\n 89: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression_impl\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2710:48\n 90: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_expression\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:2675:9\n 91: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_class_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:1400:13\n 92: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region_deferred\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:817:45\n 93: red_knot_python_semantic::types::infer::TypeInferenceBuilder::infer_region\n at /Users/micha/astral/ruff/crates/red_knot_python_semantic/src/types/infer.rs:495:54\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\nRayon: detected unexpected panic; aborting"},"old":{"module_name":"cli","metadata":{},"snapshot":"success: false\nexit_code: 1\n----- stdout -----\nwarning[lint:unresolved-reference] /test.py:2:5 Name `x` used when not defined\n\n----- stderr -----"}} +{"run_id":"1737625549-859169000","line":150,"new":null,"old":null} +{"run_id":"1737625549-859169000","line":96,"new":null,"old":null} +{"run_id":"1737625549-859169000","line":188,"new":null,"old":null} +{"run_id":"1737625549-859169000","line":216,"new":null,"old":null} +{"run_id":"1737625549-859169000","line":32,"new":null,"old":null} +{"run_id":"1737625549-859169000","line":41,"new":null,"old":null} diff --git a/crates/red_knot/tests/cli.rs b/crates/red_knot/tests/cli.rs index 6089aa32f2110..c5425b9ffcbd3 100644 --- a/crates/red_knot/tests/cli.rs +++ b/crates/red_knot/tests/cli.rs @@ -1,6 +1,7 @@ use anyhow::Context; +use insta::Settings; use insta_cmd::{assert_cmd_snapshot, get_cargo_bin}; -use std::path::Path; +use std::path::{Path, PathBuf}; use std::process::Command; use tempfile::TempDir; @@ -8,30 +9,27 @@ use tempfile::TempDir; /// project's configuration. #[test] fn config_override() -> anyhow::Result<()> { - let tempdir = TempDir::new()?; - - std::fs::write( - tempdir.path().join("pyproject.toml"), - r#" -[tool.knot.environment] -python-version = "3.11" -"#, - ) - .context("Failed to write settings")?; - - std::fs::write( - tempdir.path().join("test.py"), - r#" -import sys - -# Access `sys.last_exc` that was only added in Python 3.12 -print(sys.last_exc) -"#, - ) - .context("Failed to write test.py")?; - - insta::with_settings!({filters => vec![(&*tempdir_filter(tempdir.path()), "/")]}, { - assert_cmd_snapshot!(knot().arg("--project").arg(tempdir.path()), @r" + let case = TestCase::with_files([ + ( + "pyproject.toml", + r#" + [tool.knot.environment] + python-version = "3.11" + "#, + ), + ( + "test.py", + r#" + import sys + + # Access `sys.last_exc` that was only added in Python 3.12 + print(sys.last_exc) + "#, + ), + ])?; + + case.insta_settings().bind(|| { + assert_cmd_snapshot!(case.command(), @r" success: false exit_code: 1 ----- stdout ----- @@ -39,15 +37,15 @@ print(sys.last_exc) ----- stderr ----- "); - }); - assert_cmd_snapshot!(knot().arg("--project").arg(tempdir.path()).arg("--python-version").arg("3.12"), @r" + assert_cmd_snapshot!(case.command().arg("--python-version").arg("3.12"), @r" success: true exit_code: 0 ----- stdout ----- ----- stderr ----- "); + }); Ok(()) } @@ -69,46 +67,33 @@ print(sys.last_exc) /// And the command is run in the `child` directory. #[test] fn cli_arguments_are_relative_to_the_current_directory() -> anyhow::Result<()> { - let tempdir = TempDir::new()?; - - let project_dir = tempdir.path(); - - let libs = project_dir.join("libs"); - std::fs::create_dir_all(&libs).context("Failed to create `libs` directory")?; - - let child = project_dir.join("child"); - std::fs::create_dir(&child).context("Failed to create `child` directory")?; - - std::fs::write( - tempdir.path().join("pyproject.toml"), - r#" -[tool.knot.environment] -python-version = "3.11" -"#, - ) - .context("Failed to write `pyproject.toml`")?; - - std::fs::write( - libs.join("utils.py"), - r#" -def add(a: int, b: int) -> int: - a + b -"#, - ) - .context("Failed to write `utils.py`")?; - - std::fs::write( - child.join("test.py"), - r#" -from utils import add - -stat = add(10, 15) -"#, - ) - .context("Failed to write `child/test.py`")?; - - insta::with_settings!({filters => vec![(&*tempdir_filter(tempdir.path()), "/")]}, { - assert_cmd_snapshot!(knot().current_dir(child).arg("--extra-search-path").arg("../libs"), @r" + let case = TestCase::with_files([ + ( + "pyproject.toml", + r#" + [tool.knot.environment] + python-version = "3.11" + "#, + ), + ( + "libs/utils.py", + r#" + def add(a: int, b: int) -> int: + a + b + "#, + ), + ( + "child/test.py", + r#" + from utils import add + + stat = add(10, 15) + "#, + ), + ])?; + + case.insta_settings().bind(|| { + assert_cmd_snapshot!(case.command().current_dir(case.project_dir().join("child")).arg("--extra-search-path").arg("../libs"), @r" success: true exit_code: 0 ----- stdout ----- @@ -135,47 +120,34 @@ stat = add(10, 15) /// ``` #[test] fn paths_in_configuration_files_are_relative_to_the_project_root() -> anyhow::Result<()> { - let tempdir = TempDir::new()?; - - let project_dir = tempdir.path(); - - let libs = project_dir.join("libs"); - std::fs::create_dir_all(&libs).context("Failed to create `libs` directory")?; - - let child = project_dir.join("child"); - std::fs::create_dir(&child).context("Failed to create `child` directory")?; - - std::fs::write( - tempdir.path().join("pyproject.toml"), - r#" -[tool.knot.environment] -python-version = "3.11" -extra-paths = ["libs"] -"#, - ) - .context("Failed to write `pyproject.toml`")?; - - std::fs::write( - libs.join("utils.py"), - r#" -def add(a: int, b: int) -> int: - a + b -"#, - ) - .context("Failed to write `utils.py`")?; - - std::fs::write( - child.join("test.py"), - r#" -from utils import add - -stat = add(10, 15) -"#, - ) - .context("Failed to write `child/test.py`")?; - - insta::with_settings!({filters => vec![(&*tempdir_filter(tempdir.path()), "/")]}, { - assert_cmd_snapshot!(knot().current_dir(child), @r" + let case = TestCase::with_files([ + ( + "pyproject.toml", + r#" + [tool.knot.environment] + python-version = "3.11" + extra-paths = ["libs"] + "#, + ), + ( + "libs/utils.py", + r#" + def add(a: int, b: int) -> int: + a + b + "#, + ), + ( + "child/test.py", + r#" + from utils import add + + stat = add(10, 15) + "#, + ), + ])?; + + case.insta_settings().bind(|| { + assert_cmd_snapshot!(case.command().current_dir(case.project_dir().join("child")), @r" success: true exit_code: 0 ----- stdout ----- @@ -190,35 +162,30 @@ stat = add(10, 15) /// The rule severity can be changed in the configuration file #[test] fn rule_severity() -> anyhow::Result<()> { - let tempdir = TempDir::new()?; - - let project_dir = tempdir.path().canonicalize()?; - - std::fs::write( - project_dir.join("pyproject.toml"), - r#" -[tool.knot.rules] -division-by-zero = "warn" # demote to warn -possibly-unresolved-reference = "ignore" -"#, - ) - .context("Failed to write `pyproject.toml`")?; - - std::fs::write( - project_dir.join("test.py"), - r#" -y = x / 0 - -for a in range(0, 1): - x = a - -print(x) # possibly-unresolved-reference -"#, - ) - .context("Failed to write `test.py`")?; - - insta::with_settings!({filters => vec![(&*tempdir_filter(&project_dir), "/")]}, { - assert_cmd_snapshot!(knot().current_dir(project_dir), @r" + let case = TestCase::with_files([ + ( + "pyproject.toml", + r#" + [tool.knot.rules] + division-by-zero = "warn" # demote to warn + possibly-unresolved-reference = "ignore" + "#, + ), + ( + "test.py", + r#" + y = x / 0 + + for a in range(0, 1): + x = a + + print(x) # possibly-unresolved-reference + "#, + ), + ])?; + + case.insta_settings().bind(|| { + assert_cmd_snapshot!(case.command(), @r" success: false exit_code: 1 ----- stdout ----- @@ -234,24 +201,19 @@ print(x) # possibly-unresolved-reference /// Red Knot warns about unknown rules #[test] fn unknown_rules() -> anyhow::Result<()> { - let tempdir = TempDir::new()?; - - let project_dir = tempdir.path().canonicalize()?; - - std::fs::write( - project_dir.join("pyproject.toml"), - r#" -[tool.knot.rules] -division-by-zer = "warn" # incorrect rule name -"#, - ) - .context("Failed to write `pyproject.toml`")?; - - std::fs::write(project_dir.join("test.py"), r#"print(10)"#) - .context("Failed to write `test.py`")?; - - insta::with_settings!({filters => vec![(&*tempdir_filter(&project_dir), "/")]}, { - assert_cmd_snapshot!(knot().current_dir(project_dir), @r" + let case = TestCase::with_files([ + ( + "pyproject.toml", + r#" + [tool.knot.rules] + division-by-zer = "warn" # incorrect rule name + "#, + ), + ("test.py", "print(10)"), + ])?; + + case.insta_settings().bind(|| { + assert_cmd_snapshot!(case.command(), @r" success: false exit_code: 1 ----- stdout ----- @@ -264,8 +226,80 @@ division-by-zer = "warn" # incorrect rule name Ok(()) } -fn knot() -> Command { - Command::new(get_cargo_bin("red_knot")) +struct TestCase { + _temp_dir: TempDir, + project_dir: PathBuf, +} + +impl TestCase { + fn new() -> anyhow::Result { + let temp_dir = TempDir::new()?; + + // Canonicalize the tempdir path because macos uses symlinks for tempdirs + // and that doesn't play well with our snapshot filtering. + let project_dir = temp_dir + .path() + .canonicalize() + .context("Failed to canonicalize project path")?; + + Ok(Self { + project_dir, + _temp_dir: temp_dir, + }) + } + + fn with_files<'a>(files: impl IntoIterator) -> anyhow::Result { + let case = Self::new()?; + case.write_files(files)?; + Ok(case) + } + + fn write_files<'a>( + &self, + files: impl IntoIterator, + ) -> anyhow::Result<()> { + for (path, content) in files { + self.write_file(path, content)?; + } + + Ok(()) + } + + fn write_file(&self, path: impl AsRef, content: &str) -> anyhow::Result<()> { + let path = path.as_ref(); + + let path = if path.is_relative() { + self.project_dir.join(path) + } else { + path.to_path_buf() + }; + + if let Some(parent) = path.parent() { + std::fs::create_dir_all(self.project_dir.join(parent)) + .with_context(|| format!("Failed to create directory `{}`", parent.display()))?; + } + std::fs::write(&path, &*ruff_python_trivia::textwrap::dedent(content)) + .with_context(|| format!("Failed to write file `{path}`", path = path.display()))?; + + Ok(()) + } + + fn project_dir(&self) -> &Path { + &self.project_dir + } + + // Returns the insta filters to escape paths in snapshots + fn insta_settings(&self) -> Settings { + let mut settings = insta::Settings::clone_current(); + settings.add_filter(&tempdir_filter(&self.project_dir), "/"); + settings + } + + fn command(&self) -> Command { + let mut command = Command::new(get_cargo_bin("red_knot")); + command.current_dir(&self.project_dir); + command + } } fn tempdir_filter(path: &Path) -> String {