google / google/python-card-framework
Add missing type hints to public API classes in card_framework/v2
- 主要語言
- Python
- 星號
- 23
- 分支
- 6
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I noticed that several public-facing classes in `card_framework/v2` don’t currently have full type annotations on their methods.
Adding type hints would improve IDE autocomplete, static analysis, and overall developer experience, without changing any runtime behavior.
Suggested scope:
- `card_framework/v2/card.py`
- `card_framework/v2/header.py`
- `card_framework/v2/section.py`
- Common widgets like `text_paragraph.py`, `image.py`, etc.
This should be a purely additive change (type hints + imports from `typing`) and should not affect existing tests or serialization logic.
If this sounds reasonable, I’d be happy to take this up as a first contribution.
貢獻指南
研究方向
首先檢查 card_framework/v2/card.py、header.py、section.py 中的公開類別,以及 text_paragraph.py 和 image.py 等常用 widget。找出缺少註解的方法,並在進行增量修改前檢查附近的 typing 匯入和現有測試。完成的標準是:範圍內的公開 API 方法具有型別提示,且不改變序列化行為,同時現有測試仍然通過。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- developer-experience
- Issue 類型
- 重構
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100