ruff/crates/red_knot_python_semantic/resources/mdtest/annotations
Andrew Gallant 7e2eb591bc red_knot_python_semantic: replace one use of "old" secondary diagnostic messages
This is the first use of the new `lint()` reporter.

I somewhat skipped a step here and also modified the actual diagnostic
message itself. The snapshots should tell the story.

We couldn't do this before because we had no way of differentiating
between "message for the diagnostic as a whole" and "message for a
specific code annotation." Now we can, so we can write more precise
messages based on the assumption that users are also seeing the code
snippet.

The downside here is that the actual message text can become quite vague
in the absence of the code snippet. This occurs, for example, with
concise diagnostic formatting. It's unclear if we should do anything
about it. I don't really see a way to make it better that doesn't
involve creating diagnostics with messages for each mode, which I think
would be a major PITA.

The upside is that this code gets a bit simpler, and we very
specifically avoid doing extra work if this specific lint is disabled.
2025-04-10 13:21:00 -04:00
..
annotated.md Special-case value-expression inference of special form subscriptions (#16877) 2025-03-20 21:46:02 +00:00
any.md [red-knot] Understand Annotated (#14950) 2024-12-13 09:41:37 -08:00
callable.md Use python.typing.org for typing documentation links (#17323) 2025-04-09 20:38:20 +02:00
deferred.md [red-knot] fix eager nested scopes handling (#16916) 2025-03-28 11:11:56 -04:00
int_float_complex.md Use python.typing.org for typing documentation links (#17323) 2025-04-09 20:38:20 +02:00
invalid.md [red-knot] Ban most Type::Instance types in type expressions (#16872) 2025-03-20 15:19:56 -07:00
literal.md Use python.typing.org for typing documentation links (#17323) 2025-04-09 20:38:20 +02:00
literal_string.md Use python.typing.org for typing documentation links (#17323) 2025-04-09 20:38:20 +02:00
never.md [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
new_types.md red_knot_python_semantic: replace one use of "old" secondary diagnostic messages 2025-04-10 13:21:00 -04:00
optional.md [red-knot] Make' Type::in_type_expression()' exhaustive for Type::KnownInstance (#16836) 2025-03-19 07:36:28 -07:00
starred.md [red-knot] function parameter types (#14802) 2024-12-06 12:55:56 -08:00
stdlib_typing_aliases.md [red-knot] Add initial support for * imports (#16923) 2025-03-24 17:15:58 +00:00
string.md [red-knot] Add diagnostic for class-object access to pure instance variables (#16036) 2025-02-24 15:17:16 +01:00
union.md [red-knot] Fix false positives on types.UnionType instances in type expressions (#17297) 2025-04-09 18:33:16 +01:00
unsupported_special_forms.md [red-knot] Add ParamSpecArgs and ParamSpecKwargs as KnownClass (#17086) 2025-03-31 10:52:23 +00:00
unsupported_type_qualifiers.md Show more precise messages in invalid type expressions (#16850) 2025-03-19 17:00:30 +00:00