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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube