[Textanalytics] fix pylint/pyright for next version#44785
Merged
amber-Chen-86 merged 17 commits intoAzure:mainfrom Feb 3, 2026
Merged
[Textanalytics] fix pylint/pyright for next version#44785amber-Chen-86 merged 17 commits intoAzure:mainfrom
amber-Chen-86 merged 17 commits intoAzure:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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 |
Member
|
/azp run python - cognitivelanguage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
sarkar-rajarshi
left a comment
There was a problem hiding this comment.
Let's not disable linter rules in the samples.
sdk/cognitivelanguage/azure-ai-textanalytics/dev_requirements.txt
Outdated
Show resolved
Hide resolved
...analytics/samples/async_samples/sample_recognize_pii_entities_with_confidence_score_async.py
Outdated
Show resolved
Hide resolved
...language/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py
Outdated
Show resolved
Hide resolved
...guage/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py
Outdated
Show resolved
Hide resolved
...tivelanguage/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py
Outdated
Show resolved
Hide resolved
Member
|
/azp run python - cognitivelanguage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
sarkar-rajarshi
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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