Open Astrantia opened 5 years ago
Are you using v0.2? If not, please retest with the beta build by adding this to your VS Code settings and restarting:
"python.analysis.downloadChannel": "beta"
I am using "daily" 0.2.25.0
@jakebailey were you able to reproduce this?
Yes. This one is tough; these functions call find_element
, which calls execute
and grabs some value from the response, which comes from _unwrap_value
, which is complicated.
That means there are issues with 'tough' functions like that not getting completions. This should be given a priority 😃
Not necessarily. Depends on the how popular is the library and frequency of use of particular function.
Besides, not all functions can be analyzed with the definitive result. In dynamic untyped languages there is often not enough information in the code to tell what particular method returns. Consider void* func(void*)
in C++ or object func(object)
in C#. In this case stubs and annotations are source of information or the actual function body eval. However, evaluation also does not always work, esp if code itself creates objects dynamically or even compiles code written as strings.
Are you saying that PyCharm has a hardcoded fix for this?
It is a possibility, special casing is not unusual. PyCharm also has a lot of custom stubs.
Is there any workaround? VS code completions are not usable with selenium completely.
Version: 1.41.1 (system setup) Commit: 26076a4de974ead31f97692a0d32f90d735645c0 Date: 2019-12-18T14:58:56.166Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Windows_NT x64 10.0.17763
Name: Python Id: ms-python.python Description: Linting, Debugging (multi-threaded, remote), Intellisense, code formatting, refactoring, unit tests, snippets, and more. Version: 2019.11.50794 Publisher: Microsoft
Microsoft Python Language Server version 0.5.10.0
This will not show any completions in vscode as it should