Intellisense documentation not entirely working when sourcing/running other notebooks #2650
Replies: 3 comments 1 reply
-
The IntelliSense is not working since we don't support magic commands right now. |
Beta Was this translation helpful? Give feedback.
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
It would be awesome if IntelliSense could better handle variables and functions from %run commands in Jupyter notebooks. Here are a few ideas: Static Analysis:
Heuristic Analysis:
Integration:
This would make navigating and understanding code so much easier. Thanks for considering! |
Beta Was this translation helpful? Give feedback.
-
Discussed in #2037
Originally posted by mwh3780 November 4, 2021
I recently inherited a process where code is spread out and stored in various Jupyter notebooks and they're linked together by calling each other through
%run
ning / sourcing each other.In trying to use my normal Jupyter setup in VS Code with Pylance as the language server I've noticed that Intellisense doesn't completely work. For objects and functions defined in notebooks that are sourced as well as any modules imported in these notebook, autocompletion does work when typing the names of these objects/functions/modules, but the hover over documentation doesn't. When I hover over any of these objects, whether they are custom objects, functions, methods or modules that are defined in notebooks that are sourced the hover over documentation simply shows
Object name: Any
. And just for reference, JupyterLab and classic Jupyter Notebook don't have this issue.I tried looking for help or troubleshooting guides for this particular issue, but didn't find anything that helped.
Since reproducing the behavior involves different files, below is some minimal code that shows the behavior:
Sees the object in the environment
But documentation doesn't work
I'm using:
OS: macOS Big Sur 11.4
VS Code: Version: 1.61.2 (Universal)
Jupyter Extension Version: v2021.9.1101343141
Pylance Extension Version: v2021.11.0
Python Extension Version: v2021.10.1365161279
Beta Was this translation helpful? Give feedback.
All reactions