slackapi / slackapi/python-slack-sdk

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

オープン
#1,457 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

auto-triage-skip question Version: 3x web-client
主要言語
Python
スター
4k
フォーク
857
平均マージ
22時間 21分
マージ済み PR(30日)
16

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、記載されている Python と Slack SDK のバージョンを使い、Jedi を用いて VSCode の import 候補を再現し、WebClient と WebhookClient が表示される一方で SlackResponse と SectionBlock が表示されないことを確認します。パッケージの import 構造と Jedi の解決動作を調査します。原因が特定され、期待される候補が機能するか、問題が Jedi に絞り込まれた時点で完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。