question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intellisense completions have duplicates when `python.pylanceLspNotebooksEnabled` is true

See original GitHub issue

Repro steps:

  1. Set “python.pylanceLspNotebooksEnabled” to true
  2. Create a notebook
  3. Create some cells that create a dataframe
  4. Run the cell that creates the dataframe
  5. Create a new cell to get members.
  6. Type df.ag

Result:

image

Without python.pylanceLspNotebooksEnabled:

image

The root cause of this problem is the Jupyter extension is no longer creating the pylance server so we have no current way to query pylance for its list of completions to eliminate duplicates.

/cc @debonte

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
torextcommented, Aug 5, 2022

For me instead the duplicates appear in normal .py files once I open and run a Jupyter notebook, and with the folllowing settings:

"python.pylanceLspNotebooksEnabled": false, "jupyter.pylanceHandlesNotebooks": true,

Setting python.pylanceLspNotebooksEnabled to true instead isn’t an option currently due to the issue https://github.com/microsoft/pylance-release/issues/3126, but putting both to false,

"python.pylanceLspNotebooksEnabled": false, "jupyter.pylanceHandlesNotebooks": false,

gets rid of duplicates in both .py and .ipynb files for me and makes things acceptable.

2reactions
dlefcoecommented, Nov 28, 2022

I am seeing duplicate intellisense as well for:

ms-python.vscode-pylance 2022.11.10

ms-toolsai.jupyter v2022.9.1202862440

VSCode
Version: 1.73.0 (user setup)
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-01T15:34:06.111Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No

According to microsoft/pylance-release#3017 (comment), the python.pylanceLspNotebooksEnabled setting is going away, and as of the 1.73.0 2022-11-01T15:34:06.111Z version, it seems to be gone.

This is essentially forcing "python.pylanceLspNotebooksEnabled": true however I was still able to make "jupyter.pylanceHandlesNotebooks": false

With these settings, my .py files don’t duplicate intellisense, but my .ipynb files do duplicate intellisense.

where does one make this change ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duplicate hints while typing expression in Visual Studio Code
In my case (for python ) i had the pylance extension added. When i disabled this, the problem went away, but features were...
Read more >
Python in Visual Studio Code – June 2022 Release
We're excited to announce that the June 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available.
Read more >
Python Intellisense Performance Issues
I'm working on a Selenium project and use their WebDriver object within an class inherited by other classes I created. When I use...
Read more >
Vscode showing duplicate suggestions, How to fix? - Reddit
Thanks! I'll surely be using it forget it's there next time I have issues :D.
Read more >
11 Best VS Code extensions for Python (2022)
As a Python Developer or Data Scientist, you need the right tools to create ... IntelliSense support for auto-completion, code navigation, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found