Pyright diagnostic type incompatible
まだ誰も着手していません。
評価
調査の方向性
traitlets/traitlets.py の 479-497 行目と 135-141 行目から始め、次に Unicode のデフォルト値について報告された Pyright の診断を再現してください。型宣言が示された文字列を受け入れるべきか、または issue で抑制方法や回避策を文書化すべきかを判断してください。期待される診断の動作が確立されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
@magics_class
class SimpleGPTMagics(Magics):
api_type = Unicode("openai", help="The type of api that will be used to query the models").tag(config=True)
pyright report
Diagnostics:
1. Argument of type "Literal['openai']" cannot be assigned to parameter "default_value" of type "Sentinel" in function "__init__"
"Literal['openai']" is incompatible with "Sentinel" [reportGeneralTypeIssues]
Obviously, the argument of TraitType.__init__, default_vaue is infered to Sentinel, what can I do to suppress the diagnostic?
- 主要言語
- Python
- スター
- 653
- フォーク
- 217
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ipython/traitlets のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 65/100
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
ipython/traitlets の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·