Files
openide/python/testData/completion
Mikhail Golubevandintellij-monorepo-bot b2ef103d50 PY-83665 Stop excluding too short names from completion for importable names
Originally, when PY-62208 was first implemented, importable variants were always suggested
together with everything else, polluting the completion lookup with irrelevant "leaked"
top-level elements, such as loop variables, temporary variables, etc.

We first tried to exclude them by introducing this artificial threshold on "too short"
names that presumably could be typed manually and then imported with a quick fix.
It was possible to still complete them with a second invocation of the hotkey.
Eventually, we stopped offering importable variants at all if there are variants from
other completion contributors in PY-75580. In other words, they are suggested only when
a sufficiently long prefix has been typed to distinguish it from built-in symbols and
other names already available in scope.
Now it seems that this filtering on name length is redundant and often gets in the way,
preventing some common names, such as `Any`, `Enum` or `cast`, from being suggested.

GitOrigin-RevId: e10444d5bbbdde365f89aca38bb6f8f85940dd78
2025-09-05 13:12:34 +00:00
..