News

VS Code Update Boosts Python IntelliSense

Microsoft's latest update to the opens-source-based Visual Studio Code editor features a raft of minor improvements, including improved IntelliSense for the popular Pylance language server for Python coding.

Specifically, the VS Code 1.76 (February 2023) release improves IntelliSense support for pytest in the Pylance extension, which has been installed a whopping 51 million times.

Pylance
[Click on image for larger view.] Pylance (source: Microsoft).

The pytest framework seeks to make it easy to write small, readable tests, with the ability to scale to support complex functional testing for applications and libraries.

New pytest features include:

  • Support for completions, Go to Definition, Find All References, and Rename Symbol (F2) for pytest fixtures and parameterized arguments.
  • Type annotation support for pytest parameters through inlay hints (enabled by the "python.analysis.inlayHints.pytestParameters" setting) and through Code Actions.
  • Type inference of parameterized pytest arguments, based on the parameter values provided to the decorator.

All that is demoed in this video:

Other highlights of the release as presented by Microsoft include:

  • Profiles -- Active profile badge, quickly switch profiles via the Command Palette: Profiles, released to Stable last milestone, let you quickly switch VS Code configurations depending on your current workflow and project.
  • Accessibility improvements -- New audio cues, improved terminal screen reader mode: You can listen to the available audio cue sounds by scrolling through the Help: List Audio Cues dropdown. Error audio cue responsiveness has also been improved, along with terminal accessible improvements, context-specific Tab focus mode and more.
  • Moveable Explorer view -- Place the Explorer in the secondary side bar or a panel: The Explorer view container (Ctrl+Shift+E) is now moveable and can be placed into the secondary side bar or the bottom panel to allow for further workbench customization.
  • Notebook kernel MRU list -- Find and select recently used notebook kernels: The kernel picker now shows the most recently used (MRU) kernel by default. This is a change from the previous behavior, which was to show all available kernels.
  • Markdown header link suggestions -- Easily link to headers in files across your workspace: Workspace header completions help link to a header in another Markdown document, in case a developer doesn't remember or want to type out the full file path.
  • Remote Development usability -- New keyboard shortcut, streamlined remote options list: This milestone sees several usability improvements to the remote menu, accessible by clicking on the remote indicator in the lower left of the Status bar, including:
    • There is now a default keybinding to open the remote menu: Ctrl+Alt+O.
    • The team reduced its remote extensions' contributions to the remote menu to make it easy to view all actions for connecting to a remote window at a glance.
    • The Install Additional Remote Extensions option in the remote menu now points to a list of curated Remote Development extensions and is hidden from the remote menu if all such extensions are already installed.
  • New Git/GitHub topics -- Articles for beginner and advanced Git source control users: New articles include:
  • Improved Marketplace search -- Better results for multi-word queries.
  • Jupyter IPyWidgets 8 support -- Use the latest IPyWidgets version in your Jupyter notebooks: The Jupyter extension now supports version 8 of IPyWidgets. Python Widgets relying on IPyWidgets 7.* will continue to work, as both versions 7.* and 8.* are supported.

Preview features, meanwhile, include:

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