Azure/azure-sdk-for-python

resource_client.resource_groups.create_or_update causes Pylance error

starlord-daniel opened this issue · 1 comments

  • azure-mgmt-resource==23.0.1
  • Mac OS 14.4
  • Python 3.10.6

Describe the bug
The documented implementation of creating a resource group with the SDK causes an issue with Pylance. The code itself works, but the typing is causing an error with the default language server.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the documentation for creating a resource group while running the newest version of Pylance on VS Code.

Expected behavior
No type error should appear.

Screenshots

image
image

Additional context
The issue likely results from the fact, the package includes all versions of the resource.resources.<VERSIONS_HERE>.operations. Ideally, they could be removed to create clarity.

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.