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 for Converge360.

comments powered by Disqus

Featured

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • 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.

Subscribe on YouTube