microsoft / microsoft/azure-devops-python-api

Get core client is not typed

Open
#395 1 comment 0 reactions 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

if you follow the doc example:

core_client = connection.clients.get_core_client()

the resulting core_client variable gets an Any type from the get_core_client function. This means that you don't get autocomplete on functions available to the core_client

My current work-around:

from typing import Type
from azure.devops.released.core.core_client import CoreClient

core_client: Type[CoreClient] = connection.clients.get_core_client()

Can you fix the return type on the get_core_client function?

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 at the get_core_client function used by the documented connection.clients example and inspect its declared return type. Compare it with azure.devops.released.core.core_client.CoreClient, then verify that static type checking or editor autocomplete recognizes the returned client as CoreClient.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api, developer-experience
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.