double clicking callable inlay hint should insert `Callable`, not invalid code
Open
language-server
needs-discussion
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
```py
def f() -> int: ...
a = f
```
# expected
```py
from collections.abc import Callable
def f() -> int: ...
a: Callable[[], int] = f
```
# actual
```py
def f() -> int: ...
a: () -> int = f
```
> Yeah, this is an interesting case. For normal classes we show `type[T]` because that's a legal annotation (so double clicking it would insert valid type hint but double clicking the constructor signature would not) but for NewType `type[N]` is not a legal annotation.
_Originally posted by @yangdanny97 in [#2965](https://github.com/facebook/pyrefly/issues/2965#issuecomment-4167167610)_
Contributor guide
Assessment
This issue has not been assessed yet.