From 1607d88c2253473a116155176effa4ab14eafcce Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 29 Oct 2024 22:57:53 -0400 Subject: [PATCH] Use consistent diagnostic messages in augmented assignment inference (#13986) --- crates/red_knot_python_semantic/src/types/infer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/red_knot_python_semantic/src/types/infer.rs b/crates/red_knot_python_semantic/src/types/infer.rs index 5080bd27c4..d62ee02647 100644 --- a/crates/red_knot_python_semantic/src/types/infer.rs +++ b/crates/red_knot_python_semantic/src/types/infer.rs @@ -1438,7 +1438,7 @@ impl<'db> TypeInferenceBuilder<'db> { assignment.into(), "unsupported-operator", format_args!( - "Operator `{op}=` is unsupported for type `{}` with type `{}`", + "Operator `{op}=` is unsupported between objects of type `{}` and `{}`", target_type.display(self.db), value_type.display(self.db) ), @@ -1457,7 +1457,7 @@ impl<'db> TypeInferenceBuilder<'db> { assignment.into(), "unsupported-operator", format_args!( - "Operator `{op}` is unsupported between objects of type `{}` and `{}`", + "Operator `{op}=` is unsupported between objects of type `{}` and `{}`", left_ty.display(self.db), right_ty.display(self.db) ),