pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

[IDE] Support auto import

Open grievejia opened this issue 9 months ago • 1 comments

Tracking the support for IDE feature of auto-import

grievejia avatar May 17 '25 20:05 grievejia

What is this? is it the same as https://github.com/facebook/pyrefly/issues/377 ?

yangdanny97 avatar May 29 '25 03:05 yangdanny97

Fyi this is something users are asking for explicitly internally :)

lisroach avatar Jun 03 '25 21:06 lisroach

This might be referring to automatically completing symbols from available modules and upon completion, automatically injecting the import for the corresponding symbol. This is slightly different from #377 which is simply about supporting autocomplete when you are manually typing an import name.

MatthewScholefield avatar Jun 15 '25 00:06 MatthewScholefield

Yes, I'd like to see the appropriate imports suggested. A little bit related to #317 ...

Here's an example of suggesting a type hint (_MutuallyExclusiveGroup from argparse) without suggesting the appropriate import.

https://pyrefly.org/sandbox/?code=GYJw9gtgBAhiDmAHOBnAplAlhRYQBcoBBBAVwjQDt8AFVNEAGigDkYKVkBjNAKF5iIAXCXjkqteiCgBeYmQrU6IdCAAUASl4R8AD1mxEAOhgATUwH0IpfKRgAbewE8LaXV3ukUmAG5oL8OCkiJraeibmFnBiivhqAEQAtDDxzKZoKPgy8bqpsFz4mGCUMgDkmXj++CCkaKVaOroRltHi1AmJAEZ56ZnZucwwBUUl5fiVFsAO6PUCCChCrOwZ3BhygkbIKv7RKKFAA

ckuethe avatar Jun 30 '25 23:06 ckuethe