Undocumented Cmd method print_topics
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Documentation
When exploring the Cmd Python library, I realized that there is no documentation for print_topics method.
I only realized the missing documentation because I noticed that print_topics method has an unused parameter called cmdlen, and I couldn't figure out if it is actually useful for something.
I could also notice that on typeshed it is typed as Any, even though it seems to be only used as an int.
Extra doubts:
Maybe print_topics should be renamed to _print_topics or we should document how to use it properly?
Also, is that cmdlen parameter really needed?
I am willing to contribute with that, but I don't know which type of issue I should open to report an unused param.
Links:
- Cmd documentation: https://docs.python.org/3.13/library/cmd.html
- Cdm.print_topics definition: https://github.com/python/cpython/blob/main/Lib/cmd.py#L346
- typeshed: https://github.com/python/typeshed/blob/main/stdlib/cmd.pyi#L45
Linked PRs
- gh-134539
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Lib/cmd.py#L346 中的 print_topics 定義、Cmd 文件及其 typeshed 宣告開始。在決定預期的公開行為之前,檢視連結的 PR gh-134539,以及關於 cmdlen、命名和型別標註的未解決問題。完成表示已記錄約定的行為和參數用法,並在需要時處理 typeshed 註解。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100