geopandas: index type should be Any
オープン
まだ誰も着手していません。
stubs: false positive
- 主要言語
- Python
- スター
- 5.1k
- フォーク
- 2.1k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 82
説明
My repo currently satisfies pandas-stubs type hints. However, when I add types-geopandas, I see hundreds of new issues:
error: "Index[Any]" has no attribute "overlaps" [attr-defined]
error: "Index[Any]" has no attribute "left" [attr-defined]
error: "Index[Any]" has no attribute "right" [attr-defined]
I'm using pd.IntervalIndex, which has these attributes. However, pandas currently has no way of typing DataFrame indices (https://github.com/pandas-dev/pandas/issues/36708), so there is no way of knowing which kind of index is returned.
I think it would be more correct to use typing.Any here since it is unknown and dynamic.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
特定のファイルやテストは指定されていません。まず、DataFrame のインデックスに関する types-geopandas のアノテーションを見つけ、インデックスの種類を型付けできない pandas の現状と比較してください。完了とは、両方のスタブパッケージを使用したときに、報告されている IntervalIndex 属性エラーがもはや生成されないことを意味します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- pandas, python
- 領域
- developer-experience
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100