Intellisense does work with GTK+ 3 (GObject Introspection)

未关闭
#204 7 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
tooling

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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:

主要语言
Python
星标
304
派生
104
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/python-type-stubs 的其他 Issue

查看 microsoft/python-type-stubs 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。