[ty] Set flag to avoid type[T@f] being inserted when you double-click on the inlay (#22139)
This commit is contained in:
@@ -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('[')?;
|
||||
|
||||
Reference in New Issue
Block a user