-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Textanalytics] fix pylint/pyright for next version #44785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Textanalytics] fix pylint/pyright for next version #44785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request fixes pyright type checking issues in the azure-ai-textanalytics-authoring SDK by addressing security and type safety concerns in the serialization utilities.
Changes:
- Updated TypeSpec location configuration to point to the new spec directory path
- Replaced unsafe
eval()calls with explicit type conversions for better security and type safety - Added
cast()type hint for pyright compliance in enum type handling
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tsp-location.yaml | Updated the TypeSpec specification directory path and commit reference to align with the new repository structure |
| azure/ai/textanalytics/authoring/_utils/serialization.py | Improved type safety by adding cast() for enum types and replaced eval() with explicit type conversions; added proper error handling and updated documentation |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines