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


  • VS Code Now Has Apple Silicon Builds for Native Mac Development

    Goodbye Rosetta, hello M1. Visual Studio Code has been updated with new builds that let it run natively on machines with Apple Silicon (M1), the company's own ARM64 chips.

  • Visual Studio 2019 for Mac v8.9 Ships with .NET 6 Preview 1 Support

    During its Ignite 2021 online event for IT pros and developers this week, Microsoft shipped Visual Studio 2019 for Mac v8.9, arriving with out-of-the-box support for .NET 6 Preview 1, which the company also released recently.

  • Analyst: TypeScript Now Firmly in Top 10 Echelon (Ruby, Not So Much)

    RedMonk analyst Stephen O'Grady believes TypeScript has achieved the rare feat of firmly ensconcing itself into the top 10 echelon of his ranking, now questioning how high it might go.

  • Black White Wave IMage

    Neural Regression Using PyTorch: Training

    The goal of a regression problem is to predict a single numeric value, for example, predicting the annual revenue of a new restaurant based on variables such as menu prices, number of tables, location and so on.

Upcoming Events