From b19862c64adb340d7898cc56428a37223d86ef69 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 28 Oct 2024 21:34:12 -0400 Subject: [PATCH] Rename `operator-unsupported` to `unsupported-operator` (#13973) ## Summary Closes https://github.com/astral-sh/ruff/issues/13959. --- .../resources/mdtest/comparison/instances/rich_comparison.md | 2 +- crates/red_knot_python_semantic/src/types/infer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md b/crates/red_knot_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md index db47ac9ae9..5e21beade1 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md +++ b/crates/red_knot_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md @@ -295,7 +295,7 @@ reveal_type(A() != object()) # revealed: bool reveal_type(object() == A()) # revealed: bool reveal_type(object() != A()) # revealed: bool -# error: [operator-unsupported] "Operator `<` is not supported for types `A` and `object`" +# error: [unsupported-operator] "Operator `<` is not supported for types `A` and `object`" # revealed: Unknown reveal_type(A() < object()) ``` diff --git a/crates/red_knot_python_semantic/src/types/infer.rs b/crates/red_knot_python_semantic/src/types/infer.rs index 6c86b336a9..7720bfcbeb 100644 --- a/crates/red_knot_python_semantic/src/types/infer.rs +++ b/crates/red_knot_python_semantic/src/types/infer.rs @@ -2839,7 +2839,7 @@ impl<'db> TypeInferenceBuilder<'db> { // Handle unsupported operators (diagnostic, `bool`/`Unknown` outcome) self.add_diagnostic( AnyNodeRef::ExprCompare(compare), - "operator-unsupported", + "unsupported-operator", format_args!( "Operator `{}` is not supported for types `{}` and `{}`{}", error.op,