News

Improved IntelliSense Support for Jupyter Notebooks in VS Code

Improved IntelliSense support for Jupyter Notebooks highlights the September 2022 update of Python dev tooling in Visual Studio Code.

That tooling comes in extensions for Python (64 million installs, making it by far the most popular VS Code tool), Jupyter (nearly 45 million installs) and Pylance, the language server that provides Python-specific "smarts" in the code editor, such as code completion, parameter suggestions, semantic highlighting and so on.

It's that latter language server tool and the associated Language Server Protocol that are responsible for the improved IntelliSense support, said the dev team in a Sept. 1 announcement post.

"IntelliSense support for Jupyter Notebooks with Python kernels is now much better when using Pylance, thanks to the updates in the Language Server Protocol to include notebook support," Microsoft's Erik De Bonte said.

"Not only you will get improved auto complete suggestions when writing Python code in notebook files, but you will also be able to leverage refactoring features such as extract variable, extract method as well as auto imports."

Improved IntelliSense Support for Jupyter Notebooks in Animated Action
[Click on image for larger, animated GIF view.] Improved IntelliSense Support for Jupyter Notebooks in Animated Action (source: Microsoft).

Indeed, the changelog for the Jupyter tool shows 15 different items that mention IntelliSense.

In addition, the team announced a new extension that also leverages the Language Server Protocol -- in this case for linting support for files using the Flake8 linter -- called Flake8. It joins several other extensions that provide linting functionality (flagging programming/style errors, bugs and suspicious constructs), code formatting and sorting.

"After releasing extensions for pylint, black and isort, we are now excited to announce we also have a new flake8 extension!" said De Bonte. "Much like the others, this new extension uses the Language Server Protocol to provide linting support, and because it ships with the latest version of Flake8, you're no longer required to have it installed in a Python environment.

"You can also use it side by side with the Pylint extension, as one doesn't conflict with the other."

Also, many small enhancements and fixes were enacted in response to developer feedback, including:

  • Developers can now clear and refresh the Python interpreters list through a new button in the picker (vscode-python#19628).
  • Debugpy has been updated to version 1.6.3 (vscode-python#19698)
  • Pylance is now longer showing false warnings when importing a Python module/file in a Jupyter notebook (pylance-release#3017).
  • Renaming symbols across different cells in Jupyter notebooks no longer fails when using Pylance (pylance-release#3061).
  • IntelliSense support for matplotlib has been improved when using Pylance thanks to updates on matplotlib type stubs (python-type-stubs#223).

To figure out how to use all that tooling, Microsoft provides "Getting Started with Python in VS Code" documentation.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube