VSCode (with jedi) can't suggest imports beyond base level of package

未关闭
#1,457 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python, vscode

调研方向

首先,使用列出的 Python 和 Slack SDK 版本,通过 Jedi 复现 VSCode 中的导入建议,检查是否会出现 WebClient 和 WebhookClient,而 SlackResponse 和 SectionBlock 不会出现。检查包的导入结构和 Jedi 的解析行为;在确定原因且预期的建议能够正常工作,或将问题缩小到 Jedi 时,即可完成。

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

描述

auto-triage-skip question Version: 3x web-client

I'm trying to import classes defined in the SDK but for some reason it won't suggest imports beyond:

  • WebClient
  • WebhookClient

The imports I am looking for are SlackResponse, any of the Block classes (SectionBlock, ...) . If I manually import them they work fine and if I run pip list, slack-sdk shows up correctly.

Any ideas?

The Slack SDK version

slack-bolt==1.18.1
slack-sdk==3.26.1
slack-webhook==1.0.3

Python runtime version

Python 3.8.13

ProductName: macOS
ProductVersion: 13.1
BuildVersion: 22C65
Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000

Steps to reproduce:

image
image

Expected result:

I'd expect the SectionBlock suggestion to show up.

Actual result:

See previous screenshots

Requirements

For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

主要语言
Python
星标
4k
派生
857
平均合并
22 小时 21 分钟
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

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

slackapi/python-slack-sdk 的其他 Issue

查看 slackapi/python-slack-sdk 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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