mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
![]() 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. |
||
---|---|---|
.. | ||
annotated.md | ||
any.md | ||
callable.md | ||
deferred.md | ||
int_float_complex.md | ||
invalid.md | ||
literal.md | ||
literal_string.md | ||
never.md | ||
new_types.md | ||
optional.md | ||
starred.md | ||
stdlib_typing_aliases.md | ||
string.md | ||
union.md | ||
unsupported_special_forms.md | ||
unsupported_type_qualifiers.md |