mirror of https://github.com/astral-sh/ruff
[ty] Set flag to avoid `type[T@f]` being inserted when you double-click on the inlay (#22139)
This commit is contained in:
parent
884e83591e
commit
a46835c224
|
|
@ -6614,13 +6614,6 @@ mod tests {
|
|||
3 | y[: type[T@f]] = x
|
||||
| ^^^
|
||||
|
|
||||
|
||||
---------------------------------------------
|
||||
info[inlay-hint-edit]: File after edits
|
||||
info: Source
|
||||
|
||||
def f[T](x: type[T]):
|
||||
y: type[T@f] = x
|
||||
"#);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -711,6 +711,7 @@ impl<'db> FmtDetailed<'db> for DisplayRepresentation<'db> {
|
|||
f.write_char(']')
|
||||
}
|
||||
SubclassOfInner::TypeVar(bound_typevar) => {
|
||||
f.set_invalid_syntax();
|
||||
f.with_type(KnownClass::Type.to_class_literal(self.db))
|
||||
.write_str("type")?;
|
||||
f.write_char('[')?;
|
||||
|
|
|
|||
Loading…
Reference in New Issue