added isinstance checks to fix tox pyright errors#39780
added isinstance checks to fix tox pyright errors#39780chrisribe wants to merge 7 commits intoAzure:mainfrom
Conversation
|
API change check API changes are not detected in this pull request. |
|
Finally green all checks passed 💯 |
|
|
||
|
|
||
| def _get_model(module_name: str, model_name: str): | ||
| def _get_model(module_name: str, model_name: typing.Union[str, typing.ForwardRef]) -> typing.Any: |
There was a problem hiding this comment.
Given these typing errors arise from the generated code, it is up to the code generator to fix them. We test our code generator against the latest versions of the type checkers we run, so it should generate type clean code for each client library. It looks like this library was last generated ~7 months ago. I suspect if we regenerate the code with the latest version of the generator that these errors will be cleaned up.
There was a problem hiding this comment.
Thanks @kristapratico for your comment. It prompted me to review the documentation again. I found it odd that I needed to modify these files, as the comments didn't indicate they were auto-generated.
I now understand that these files need to be rebuilt locally using the tsp-client and the latest azure-rest-api-specs for our project. As you mentioned, this hasn't been done in the last ~7 months, and I just picked this up. Apologies for the confusion.
There was a problem hiding this comment.
Ok seems I am stepping on toes here and a PR is already in review:
#38437
Dropping this PR request.
Sorry for the bother.
|
Closing duplicate effort. |
Description
I fixed some pyright errors that where showing up in builds.
Build error ref: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4534605&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=56d4e2e6-c43b-527c-bad7-234ebe7429dd&l=86
The changes where made to the following files, but I am not sure if these are generated or not.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines