Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Search for additional import matches" is shown when zero matches are found #6421

Open
debonte opened this issue Sep 21, 2024 · 0 comments
Open
Assignees
Labels
skip-reassign Optional label that tells the issue automation bot to not reassign the owner

Comments

@debonte
Copy link
Contributor

debonte commented Sep 21, 2024

Environment data

  • Pylance version: 2024.9.101
  • Python version: 3.12.6

Code Snippet

chdir
nonsense

Repro Steps

  1. Trigger the light bulb on chdir. You'll see options to add imports from contextlib and os, plus a "Search for additional import matches" code action.
    image
  2. Trigger the light bulb on nonsense.

Expected behavior

Since no "add import" code actions are listed, we also don't show "Search for additional import matches".

IIRC, there's a maximum number of "add import" code actions that we'll show in this list. My guess is that "Search for additional import matches" should only appear if the number of available matches exceeds that maximum.

Actual behavior

We only show "Search for additional import matches"

image

@debonte debonte added the skip-reassign Optional label that tells the issue automation bot to not reassign the owner label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-reassign Optional label that tells the issue automation bot to not reassign the owner
Projects
None yet
Development

No branches or pull requests

2 participants