简体   繁体   中英

Python : Some of Intellisense dosen't work on VS Code

I had some trouble while using openpyxl on the VS code. Almost of intellisense are work well, but Some of them are not work. I think intellisenses is not working that some of after dot sentences.

for example // worksheet = workbook.active when i wrote this code,the intellisense suggest well .active .

but it's not working when i want to write worksheet.iter_cols or .max_row or .value .

I had installed pylance and also got setting Language server.And I use only one version of python 3.9.1 64-bit and openpyxl 3.0.7 version.

It's not critical inconvenience but i want to know how can i fix it. what should i do?

When I use the code " from openpyxl import workbook " and the language service used is "Pylance", input "workbook." will display "Intellisense":

在此处输入图像描述

In VS Code, its "Intellisense" will display the methods or classes contained in the imported module, for example: you could click "Ctrl" and click the code " openpyxl " or " xl " with the mouse, it will jump to the module related definition document:

在此处输入图像描述

And click on the related definition file of "workbook", it has no methods or classes of "iter_cols", "max_row", "value":

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM