microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 766 forks source link

Pylance Autocomplete not working well #1866

Closed fatihesergg closed 3 years ago

fatihesergg commented 3 years ago

I have problem with pylance.Im new on vscode and programming but im sure its working weird.When i type driver.se and [ctrl+space] "send_keys" not in suggestion tab.If i tpye driver.send_ke [ctrl+space] then i have no suggestion.Already tried uninstalling and installing on fedora 34& windows 10.But i have nothing.Thanks Advance

Expected behaviour

https://imgur.com/a/l0URt6k

Actual behaviour

https://i.imgur.com/4PdCKUn.png

Logs

[Info  - 8:17:55 PM] Pylance language server 2021.9.3 (pyright d2771b18) starting
[Info  - 8:17:55 PM] Server root directory: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist
[Info  - 8:17:55 PM] No configuration file found.
[Info  - 8:17:55 PM] No pyproject.toml file found.
[Info  - 8:17:55 PM] Setting pythonPath for service "Bot": "/bin/python"
[Warn  - 8:17:55 PM] stubPath /home/fatih/Desktop/Bot/typings is not a valid directory.
[Info  - 8:17:55 PM] Assuming Python version 3.9
[Info  - 8:17:55 PM] Assuming Python platform Linux
Search paths for /home/fatih/Desktop/Bot
  /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib
  /home/fatih/Desktop/Bot
  C:/Users/fatih/Desktop/Bot/.venv/site-packages/pyrogram
  /home/fatih/Desktop/Bot/typings
  /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/...
  /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/bundled/stubs
  /usr/lib64/python3.9
  /usr/lib64/python3.9/lib-dynload
  /home/fatih/.local/lib/python3.9/site-packages
  /usr/lib64/python3.9/site-packages
  /usr/lib/python3.9/site-packages
[Warn  - 8:17:55 PM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 8:17:55 PM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 8:17:55 PM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 8:17:55 PM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 8:17:55 PM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info  - 8:17:55 PM] Searching for source files
[Info  - 8:17:55 PM] Auto-excluding /home/fatih/Desktop/Bot/.venv
[Info  - 8:17:55 PM] Found 15 source files
[Info  - 8:17:55 PM] Background analysis(1) root directory: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist
[Info  - 8:17:55 PM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setImportResolver
Background analysis message: ensurePartialStubPackages
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: setFileOpened
Background analysis message: getSemanticTokens full
[BG(1)] getSemanticTokens full at /home/fatih/Desktop/Bot/saat.py ...
[BG(1)]   parsing: /home/fatih/Desktop/Bot/saat.py (40ms)
[FG] parsing: /home/fatih/Desktop/Bot/saat.py (81ms)
[FG] parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (132ms)
[FG] binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/builtins.pyi (38ms)
[FG] binding: /home/fatih/Desktop/Bot/saat.py (1ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (100ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/builtins.pyi (48ms)
[BG(1)]   binding: /home/fatih/Desktop/Bot/saat.py (1ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/typing.pyi [fs read 2ms] (51ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/typing.pyi (14ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 0ms] (7ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (2ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/typing_extensions.pyi [fs read 0ms] (3ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/typing_extensions.pyi (3ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/__init__.pyi [fs read 0ms] (0ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/__init__.pyi (1ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/common/keys.pyi [fs read 0ms] (1ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/common/keys.pyi (1ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/firefox/options.pyi [fs read 0ms] (1ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/firefox/options.pyi (1ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/time.pyi [fs read 0ms] (4ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stdlib/time.pyi (2ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/__init__.pyi [fs read 0ms] (7ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/__init__.pyi (1ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/firefox/webdriver.pyi [fs read 0ms] (10ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/firefox/webdriver.pyi (1ms)
[BG(1)]   parsing: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/remote/webdriver.pyi [fs read 0ms] (12ms)
[BG(1)]   binding: /home/fatih/.vscode/extensions/ms-python.vscode-pylance-2021.9.3/dist/typeshed-fallback/stubs/selenium/selenium/webdriver/remote/webdriver.pyi (2ms)
[BG(1)] getSemanticTokens full at /home/fatih/Desktop/Bot/saat.py (371ms)
Background analysis message: getSemanticTokens range
[BG(1)] getSemanticTokens range 0:0 - 48:0 at /home/fatih/Desktop/Bot/saat.py (7ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/fatih/Desktop/Bot/saat.py ...
[BG(1)]   checking: /home/fatih/Desktop/Bot/saat.py (3ms)
[BG(1)] analyzing: /home/fatih/Desktop/Bot/saat.py (4ms)
Background analysis message: resumeAnalysis

Code Snippet / Additional information

from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.firefox.options import Options import time

firefox_opts = Options() firefox_opts.add_argument('--headless') driver = webdriver.Firefox(options=firefox_opts) driver.get('https://www.instagram.com')

driver.send_key

time.sleep(3) username = driver.find_element_by_xpath("//input[@name=\'username\']")

username.clear() username.send_keys('') username.send_keys(Keys.RETURN)

password = driver.find_element_by_xpath("//input[@name=\'password\']")

password.clear() password.send_keys('') password.send_keys(Keys.RETURN)

giris_yap = driver.find_element_by_xpath('//button[@type=\'submit\']')

time.sleep(3)

dm = driver.get('https://www.instagram.com/direct/inbox/')

not_now = driver.find_element_by_xpath('//button[@class=\'aOOlW HoLwm \']').click()

time.sleep(2)

kelco = driver.find_element_by_partial_link_text('').click()

time.sleep(2) while True: msg = driver.find_element_by_xpath('//textarea') msg.send_keys('Herbir saate çalışır.') time.sleep(1) msg.send_keys(Keys.RETURN) time.sleep(3600)

XXX
jakebailey commented 3 years ago

This is microsoft/python-type-stubs#201 or microsoft/pylance-release#1695; the selenium stubs we ship (https://github.com/python/typeshed/tree/master/stubs/selenium) are not very complete, and seemingly worse than analyzing the library itself.

judej commented 3 years ago

Closing - duplicate