News

Visual Studio Code Python Extension Improves Linting, More

Microsoft's Visual Studio Code team has updated the popular, open source Python extension it acquired a few months ago, adding yet more functionality to the tool that has been installed more than 6 million times.

As we reported in November, the team has gone all in on Python support, hiring the extension's author, Don Jayamanne, taking over the project and hiring additional Python programmers to help out.

VS Code is getting industry accolades for its programming language support (more than 150 languages), enabled by the Microsoft's Language Server Protocol, which provides language-specific intelligence and communicates with development tools via a protocol enabling inter-process communication that allows for functionality such as auto code complete, go to definition, documentation on hover and so on.

Linting -- in which the editor analyzes source code for potential errors -- is also provided by language servers, and that functionality is improved in the January 2018 release.

"In this release we closed a total of 72 issues focusing on linting improvements, support for virtual environments, and other general improvements," said Microsoft's Dan Taylor in a Feb. 1 post.

Those linting improvements affect Pylint (the default linter) rules and provide easier linting configuration.

Default Pylint rules now call for displaying only errors and warnings about possible coding mistakes that could actually cause runtime exceptions. Style rule warnings -- and some other warnings -- are no longer shown under the default configuration. Taylor said this cuts down on the "unnecessary noise" of the linting experience, focusing only on the more problematic issues rather than displaying warnings about variable or function names, for examples. Of course, the rules can be customized to suit different developers.

Also, some linter setting can now be set via commands rather than the manual process of editing configuration files.

"The Python: Select Linter command allows you to select your linter of choice, and the Python: Enable Linting allows you to enable and disable linting," Taylor said.

He also noted the Python terminal now supports virtual environments in addition to conda (a language-agnostic package manager and environment management system), either of which can be pre-selected to they automatically activate upon opening a new terminal window. This means, for example, a Flask app can run if Flask support is activated in a virtual environment, even though Flask isn't installed globally on the dev machine. Previously, without virtual environment support, the terminal would use the global Python interpreter and -- upon finding no Flask support -- launching the app from the terminal wouldn't work.

The extension in the Visual Studio Marketplace is nearing 6.2 million downloads as of this writing and has earned an average 4.6 rating (0-5 scale) from 162 reviewers. When we reported Jayamanne's hiring last November, it had been installed 4.2 million times and had an average 4.7 rating from 139 reviewers, speaking to the popularity of the project.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

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

Subscribe on YouTube