Azure / Azure/azure-sdk-for-python

Type Check failing after azure-mgmt-resourcegraph update

Aperta
#44,158 4 commenti 0 reazioni 1 assegnatario Rivendicata da @msyyc Vedi su GitHub
CodeGen customer-reported Mgmt needs-team-attention question
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g
PR unite (30g)
217

Descrizione

- **Package Name**: azure-mgmt-resourcegraph
- **Package Version**: 8.0.1
- **Operating System**: ubuntu (latest)
- **Python Version**: 3.11.14

**Describe the bug**
As part of our build pipeline stage we run a "Run type checks" step using: pyright .\src\.

Since this morning this check fails our ResourceGraphHelper Python Function which uses:
"from azure.mgmt.resourcegraph import ResourceGraphClient"

We have not made any change to this function and the build run successfully since this morning.

The error we are getting is:
Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"
"Literal[0]" is not assignable to "str" (reportArgumentType)

This is part of the code:
```python
f not isinstance(response.data, list) or not isinstance(response.data[0], dict) or mgmt_group_id_key not in response.data[0]:
```
We compared which libraries were downloaded on the pipeline host and the only difference between a working Type check and a failing type check is that the version of the azure-mgmt-resourcegraph changed from v8.0.0 to v8.0.1.

Image

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.