mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-18 09:30:35 +00:00
[ty] Change range of revealed-type
diagnostic to be the range of the argument passed in, not the whole call (#17980)
This commit is contained in:
parent
642eac452d
commit
03a4d56624
25 changed files with 175 additions and 173 deletions
|
@ -4781,7 +4781,9 @@ impl<'db> TypeInferenceBuilder<'db> {
|
|||
) {
|
||||
let mut diag =
|
||||
builder.into_diagnostic("Revealed type");
|
||||
let span = self.context.span(call_expression);
|
||||
let span = self
|
||||
.context
|
||||
.span(&call_expression.arguments.args[0]);
|
||||
diag.annotate(Annotation::primary(span).message(
|
||||
format_args!(
|
||||
"`{}`",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue