microsoft / microsoft/azure-devops-python-api

Implement type hints on top of docstring `rtype`

Open
#483 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
684
Forks
218
Avg merge
8d 10h
Merged PRs (30d)
1

Description

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 !

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the client factory methods named in the issue, including get_git_client and get_build_client, and inspect how their docstring rtype declarations correspond to returned clients. Determine the scope of factories that need annotations and verify that the resulting return types restore analyzer autocompletion; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.