Intellisense does work with GTK+ 3 (GObject Introspection)

Aperta
#204 7 commenti 6 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Start with the GTK/GObject Introspection reproduction in the issue, including import gi, gi.require_version, and from gi.repository import Gtk. Review the linked Jedi and vscode-python discussions to understand the missing autocomplete support. Done means Pylance offers member functions and variables after Gtk. as Jedi does.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

compiled needs stub

Environment data

  • Language Server version: v2020.11.2
  • OS and version: Ubuntu 20.04 (WSL2) on Win 10, 19041.630
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.8.5

Expected behaviour

Autocomplete should show member functions and variables for GTK+ 3 library (import gi)

Actual behaviour

Autocomplete does not work for import gi

Logs

Nothing of relevance appeared to be in the logs for the language server. Things like: "setFileOpened, getDiagnosticsForRange, parsing file, binding, file, getSemanticTokens", but nothing odd.

Code Snippet / Additional information

  • Install GTK graphical user interface library -- gir bindings (gir1.2-gtk-3.0)
  • Install Python 3 bindings for gobject-introspection libraries (python3-gi)
  • Try to autocomplete Gtk.
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
win = Gtk.

Key issue: This works as expected if I change the language server to jedi, but does not work with pylance. Autocomplete also works fine in the Ubuntu command line interpreter (python3).

Related discussion that I found (but had trouble interpreting) on other github projects:

Lingua principale
Python
Stelle
304
Fork
104
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/python-type-stubs

Tutte le issue di microsoft/python-type-stubs

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.