Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.36k stars 2.71k forks source link

[Key Vault] Make data-plane packages `pyright`-compliant #29482

Open mccoyp opened 1 year ago

mccoyp commented 1 year ago

As is pointed out in https://github.com/Azure/azure-sdk-for-python/issues/29448, Key Vault libraries currently raise some pyright errors. We should clean up any errors for each azure-keyvault-* package and enable pyright checks in CI afterwards by removing pyright = false from each pyproject.toml (example).

The guidance in static_type_checking.md and static_type_checking_cheat_sheet.md should be helpful to guide this work.

mccoyp commented 1 year ago

Update: code generated with DPG is pyright-compliant, but Key Vault can't be generated in this way yet because of its multiapi use. Text Analytics is in a similar boat; it was made as compliant as possible, but checks can't be enabled until generated code can be updated to be compliant. Excluding the _generated path with configuration probably won't resolve all warnings because of how pyright follows types that are imported from any included code.