We are pleased to announce that theSeptember2020release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from theMarketplace, orinstall it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restartingVisualStudio Code. You can learn moreaboutPython support in Visual Studio Code in the documentation.
This was a short release where we addressed total of 34issues,and itincludes support for colorization and auto import improvements withPylance, our new language server extension for Python in VS Code.
If youre interested, you can check thefull list of improvements inourchangelog.
Support for semanticcolorizationinPylance
We areexcitingto announce that you can now getsupport for semantic colorizationwithPylance,helpingto improve the readability of your code.Semantic colorization isan extension on syntax highlighting.Pylancegenerates semantic tokenswhich are used by themes to apply colorsbased on the semantic meaning of symbols(e.g. variables, functions, modulesall have different colors applied to them).To see this new feature in action, youll need to apply a theme that supports semantic color. Some greatthemestotry outsemantic colorizationare the built-in Dark+ theme orOne Dark Pro.
Check out the before and after on this code sample with semantic colorization!
[Python code with semantic colorization]
Pylanceauto-import improvements
With improvedauto-importcompletions, you can nowseeaclearerpreview of the import statement that will be added to your filein the completion tooltip.The way thatPylanceadds imports to your filehas also been improvedby detecting when youve already importedothersubmodules or functions from that module. Insteadof adding a duplicate import statement to your file,Pylancewill nowamend the existing oneby adding thesymbol alphabeticallyinthe statement, helping to keep your imports organized.
[Preview of the import statement on tooltip for auto import. ]
Otherchanges andenhancements
We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python inVisualStudio Code. Some notable changes include:
- Live reload is now on by default for Flask and Django debug configuration(thanksian910297!) (#13061)
- Upgradeisortto5.5.2. (#13831)
- Drop support for Python 3.5 (it reachedend-of-lifeinSeptember 2020 andisort5 does not support it). (#13459)
Were constantlyA/B testingnew features. If you see something different that was not announced by the team, you may be part of the experiment! To see if you are part of an experiment, you can check the first lines in the Python extension output channel. If you wish to opt-outofA/B testing, you can open the usersettings.jsonfile (View>Command Palette…and runPreferences: Open Settings (JSON))and set the “python.experiments.enabled” setting to false.
Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problemsor have suggestions,please file an issueon the Python VS Code GitHub page.
[Microsoft]
0 comments