Add explicit `-> Any` return type annotation to `.pin_read` and `.pin_download`
まだ誰も着手していません。
評価
調査の方向性
.pin_read と .pin_download の定義を見つけ、load_data や pd.DataFrame などの呼び出しから現在の戻り値の型がどのように推論されるかを調べます。要求された typing.Any の戻り値アノテーションを追加し、型チェックで呼び出し側が推論された戻り値の型を絞り込む必要がなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
説明
These functions are currently un-annotated, so some type checkers (e.g. pyright) will try to infer based on the underlying function calls like load_data and by extension function calls like pd.DataFrame.
It would be better if we explicitly annotated these with typing.Any since it would mean the type checker short-circuits this inference and wouldn't raise an error if the user fails to narrow down the type through case-checking from DataFrame | dict etc.
It would also play nicer with extension packages like geopins which extend the interface to give extra return types dynamically, which the type checker doesn't know about.
I understand that pins isn't typically used in the context of heavy-duty type checking but I think this is pretty easy thing to add and would make it more pleasant to work with in VS Code which usually does light pyright analysis via pylance.
I can put in a PR
- 主要言語
- Python
- スター
- 59
- フォーク
- 11
- 平均マージ
- 1時間 9分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rstudio/pins-python のほかの issue
-
.maint
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rstudio/pins-python#280 ·
-
testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rstudio/pins-python#196 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
rstudio/pins-python#354 ·
-
.documentation
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
rstudio/pins-python#348 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
rstudio/pins-python#347 ·
rstudio/pins-python の issue をすべて見る
似ている issue
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
EclipseFdn/open-vsx.org#13737 ·
メンテナーはふだん 1 日以内に返信
-
Zero-token evaluations are treated as missing cost in selection対応中かも @sylvesterkaczmarek が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
google-research/rrsi#6 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
aws-samples/sample-aws-genai-db-modernizer#294 ·
メンテナーはふだん 1 日以内に返信
-
feedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
githubnext/gh-aw-workshop#4174 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
WingedGuardian/GENesis-AGI#2852 ·
メンテナーはふだん 1 日以内に返信