microsoft / microsoft/azure-devops-python-api

Implement type hints on top of docstring `rtype`

未關閉
#483 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
684
分支
218
平均合併
8 天 10 小時
30 天內合併 PR
1

描述

Hi,

The code is quite well documented, and uses docstring heavily. However, the "Python way" is to use type hints which are powerful and enable a good code completion.

For exaample, the client factory (get_git_client, get_build_client, ...) does not have type hints. Due to how it is written, python analyzers can not infer the returned types and this breaks autocompletion.

Could you please generate them them?

For example something like this:

    def get_git_client(self) -> GitClient:
        """get_git_client.
        Gets the 7.0 version of the GitClient
        :rtype: :class:`<GitClient> <azure.devops.v7_0.git.git_client.GitClient>`
        """
        return self._connection.get_client('azure.devops.v7_0.git.git_client.GitClient')

Thanks !

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先定位 issue 中提到的用戶端工廠方法,包括 get_git_client 和 get_build_client,並檢查其 docstring 中的 rtype 宣告與回傳的用戶端之間的對應關係。確定需要新增註解的工廠範圍,並驗證產生的回傳型別能夠恢復 analyzer 的自動完成;該 issue 未指定具體的檔案或測試。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
azure, python
領域
api
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。