In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the features of Pylance. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Pylance
Installation
Like other VS Code plug-ins, you can directly click the plug-in market icon in the side activity bar and search Pylance for installation.
After installation, open a new .py file and use it.
Characteristics
Like other Python language servers, Pylance is optimized to improve development efficiency and experience, with the following main features:
The Docstrings parameter prompts for automatic import code completion code diagnosis references and jump code outline type checking to support multiple workspaces with type information signatures to help compatible with IntelliCode and Jupyter notebook
For these features, I will not introduce them one by one, but choose a few that I think are good to introduce.
Docstrings
Reading classes, methods, and function documents is a very common scenario in development. Pylance provides an easy way to read documents. You only need to hover the mouse over the corresponding classes, functions, and methods to display the corresponding string string documents.
Parameter hint
When calling a function, class, or method, Pylance can prompt for detailed parameter information.
Automatic import
When using Pycharm, when we use a package or module, we can use the shortcut key Alt+Enter to quickly import the corresponding module. The same function can be achieved through Pylance.
Code completion
Like most code completion tools, Pylance can automatically complete code, and it is fast and accurate.
Code diagnosis
Pylance can diagnose Python code and underline code that does not conform to Python syntax. It is of great help to standardize coding and improve code quality.
References and jumps
This is a very basic function in the development process, so as a language server, you should naturally support references and redirects.
Type check
Type checking in Pylance is off by default, and if you are interested in Python type checking, you can turn it on in the settings. Type checking includes two modes, namely, mode or strict mode. This setting uses Pyright s type checking to apply a basic or comprehensive rule set to the code, respectively. The diagnostics generated by this pattern can help improve code quality and help you find boundary situations more easily.
Support for multiple workspaces
Pylance supports multiple workspaces so that you can open multiple folders in the same Visual Studio code session and have Pylance functionality in each folder.
Thank you for reading! This is the end of this article on "what are the characteristics of Pylance?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.