The autocomplete popup should not appear on typing a left square bracket if no specific suggestions are available #3236
Replies: 6 comments 1 reply
-
I'm guessing that the user is seeing the keyword and stdlib suggestions, like this: @atrigent, can you confirm? If you're seeing something different, please provide a code sample and a screenshot of the completion list you are getting. |
Beta Was this translation helpful? Give feedback.
-
Yes, that is what I'm seeing. It's the same thing the person was seeing in #1712. |
Beta Was this translation helpful? Give feedback.
-
This would be an enhancement and will therefore move to discussions for more user feedback/upvotes. |
Beta Was this translation helpful? Give feedback.
-
@judej I disagree that this is an enhancement or that it requires a discussion post. Did you read my description of the issue? Even if this behavior was intentional (and I don't believe it was), it's inconsistent with the rest of the behavior of the plugin and should be changed for that reason. It also simply makes no sense to start autocompleting before there is any indication at all what the user intends to type. Please change this back to an issue. |
Beta Was this translation helpful? Give feedback.
-
I agree with atringent on this one-- this is a strange behavior that seems at odds with the way the way the rest of the plugin works, and most certainly should not be occurring. I've been trying to find some way to fix the issue, only to see that anything relating to it has been moved here to the "discussion" section, which doesn't seem right. |
Beta Was this translation helpful? Give feedback.
-
I made an issue out of this discussion. I think it looks weird too, but maybe there's a technical reason why we can't have an empty list. We'll discuss in triage next week. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Yes, I know this is similar to the pre-existing issue #1712 and the discussion #2599 that was created from it. However, I'm not asking for the popup to only contain relevant suggestions or those that would be syntactically valid - I'm suggesting that the popup should not appear at all in this context. I believe it does because, in some cases when typing a
[
, such as when indexing a dictionary that was defined nearby or for which type information is available, Pylance is able to make specific, useful suggestions. However, in most other situations it can't. Pylance doesn't open the autocomplete popup in any other situations where no particular information or specific suggestions are available, because it's more reasonable then to wait until the user starts typing a name or explicitly invokes the autocomplete dialog. Pylance should do the same in such cases when[
is typed.Environment data
Repro Steps
[
in an editor where pylance is activated in a situation where no specific suggestions are availableExpected behavior
This popup should not appear, just as it doesn't in any other analogous situations.
Actual behavior
A popup appears with some generic suggestions.
Beta Was this translation helpful? Give feedback.
All reactions