microsoft / microsoft/azure-devops-python-api

Implement type hints on top of docstring `rtype`

オープン
#483 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
684
フォーク
218
平均マージ
8日 10時間
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、issue で名前が挙げられているクライアントファクトリメソッド(get_git_client や get_build_client など)を見つけ、それらの docstring の rtype 宣言が返されるクライアントにどのように対応しているかを確認します。アノテーションが必要なファクトリの範囲を特定し、結果として得られる戻り値の型によって analyzer のオートコンプリートが復元されることを検証します。この issue では、具体的なファイルやテストは指定されていません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
api
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。