Azure / Azure/azure-sdk-for-python

Type Check failing after azure-mgmt-resourcegraph update

Offen
#44,158 4 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @msyyc Auf GitHub ansehen
CodeGen customer-reported Mgmt needs-team-attention question
Vorherrschende Sprache
Python
Sterne
5.6k
Forks
3.4k
Ø Merge
2 T. 2 Std.
Gemergte PRs (30 T.)
213

Beschreibung

- **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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.