Type annotations for public API would be nice
維護者通常 7 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
The payload names no specific modules, so the public API surface must be identified first, for example by running Pyright's --verifytypes check the issue suggests to get a baseline of untyped symbols. Annotating those symbols and then adding an empty py.typed marker to the package is the intended change. Done means the chosen public API passes the type-completeness check and the marker ships with the package. The issue has no comments or maintainer decision on scope, so confirm the surface before starting.
由索引模型根據 Issue 內容生成。
描述
Is your feature request related to a problem? Please describe.
Most of the project's public API lacks static type annotations and consequently there is also no py.typed marker that signals to library consumers that their usages of these APIs may be type checked.
Describe the solution you'd like
It would be nice if at least the public API of this project was fully statically typed and then a py.typed marker added so that dependent projects can check that their usages of this library are correct, get type-based IDE autocompletion etc.
Describe alternatives you've considered
- Wait for a 3rd party to publish a type stubs package. But there already are some type hints in Rope's codebase, so I don't see the point.
Additional context
- API docs as suggested in #796 would also greatly benefit from type annotations.
- Pyright's
--verifytypesoption may be used to check if the public interface is in fact "type complete". Mypy might have something similar in the form of coverage reports.
- 主要語言
- Python
- 星號
- 2.2k
- 分支
- 197
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 5
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python-rope/rope 的其他 Issue
-
難度 1/5 1-3 小時 新手友好度 88/100
python-rope/rope#927 ·
維護者通常 7 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
python-rope/rope#926 ·
維護者通常 7 天內回覆
-
simplify.real_code blanks t-strings, so renames inside them edit the wrong offset可能已有人在做 @sean0407 於 10 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 83/100
python-rope/rope#913 ·
維護者通常 7 天內回覆
-
難度 4/5 3-5 天 新手友好度 30/100
python-rope/rope#925 ·
維護者通常 7 天內回覆
-
Extract method/variable and introduce parameter don't check whether the new name is already in use未關閉
難度 3/5 1-2 天 新手友好度 62/100
python-rope/rope#924 ·
維護者通常 7 天內回覆
相似的 Issue
-
New Internship未關閉new_internship
難度 2/5 1-3 小時 新手友好度 68/100
-
get_graph warns that the oneway column is missing when no way has a oneway tag可能已有人在做 @HTenkanen 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
fix: security 🔐 style: article/section 📝 system: data-mgmt 🗃️ system: security 🔐 system: software 💻
難度 2/5 1-3 小時 新手友好度 65/100
uabrc/uabrc.github.io#1267 ·
-
Bot Type: Bug Type: Documentation
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆