microsoft / microsoft/typespec

[Python] mypy error for generated SDK code

Open
#6,071 2 comments 0 reactions 1 assignee Claimed by @msyyc View on GitHub
emitter:client:python
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

For https://github.com/Azure/azure-sdk-for-python/pull/39743, CI reports [mypy error](https://dev.azure.com/azure-sdk/29ec6040-b234-4e31-b139-33dc4287b756/_apis/build/builds/4576522/logs/572):

![Image](https://github.com/user-attachments/assets/1424cea8-5506-4f8d-a13e-f983490a5a3b)

And here is the generated SDK code:

![Image](https://github.com/user-attachments/assets/c9454bae-cd4d-4147-a25d-3b150e7e74bf)

https://github.com/kevinzz6/azure-sdk-for-python/blob/1ba41478dff87379b3b4aea3a71217001963d6a6/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_notebook_operations.py#L603-L614

The reason is that `_request` is assigned twice.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.