Resolving next-pylint 4.0.5 issues for azure-ai-ml sdk and updating s…#46081
Open
jayesh-tanna wants to merge 6 commits intoAzure:mainfrom
Open
Resolving next-pylint 4.0.5 issues for azure-ai-ml sdk and updating s…#46081jayesh-tanna wants to merge 6 commits intoAzure:mainfrom
jayesh-tanna wants to merge 6 commits intoAzure:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates azure-ai-ml to address next-pylint (pylint 4.x) findings by replacing unidiomatic type checks in tests, adjusting exception logging, and refining the internal “fix-pylint” skill documentation.
Changes:
- Replaced many
type(x) == Y/type(x) is Yassertions in tests withisinstance(...)to satisfyunidiomatic-typecheck. - Downgraded exception logging in
DeploymentTemplateOperationsfrom warning/error to debug and simplified try/except blocks. - Updated
.github/skills/ml/fix-pylint/SKILL.mdto clarify scope and reorganize steps.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ml/azure-ai-ml/tests/workspace/ai_workspaces/unittests/test_project_entity.py | Switches to isinstance assertion for pylint compliance. |
| sdk/ml/azure-ai-ml/tests/workspace/ai_workspaces/unittests/test_hub_entity.py | Switches to isinstance assertion for pylint compliance. |
| sdk/ml/azure-ai-ml/tests/sweep_job/unittests/test_sweep_job_schema.py | Replaces strict type assertions with isinstance checks in sweep schema tests. |
| sdk/ml/azure-ai-ml/tests/schedule/unittests/test_schedule_entity.py | Updates schedule validation assertions to isinstance. |
| sdk/ml/azure-ai-ml/tests/local_endpoint/e2etests/test_local_endpoint.py | Updates response type assertion to isinstance. |
| sdk/ml/azure-ai-ml/tests/connection/unittests/test_connection_entity.py | Converts many type assertions to isinstance and adds a targeted pylint disable for one exact-type comparison. |
| sdk/ml/azure-ai-ml/tests/connection/e2etests/test_connections.py | Updates connection type assertion to isinstance. |
| sdk/ml/azure-ai-ml/tests/batch_services/e2etests/test_batch_endpoint.py | Updates exception type assertion to isinstance. |
| sdk/ml/azure-ai-ml/azure/ai/ml/operations/_deployment_template_operations.py | Adjusts exception logging levels and simplifies control flow around template operations. |
| sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/_model_base.py | Adds file-level pylint disable for unidiomatic-typecheck. |
| .github/skills/ml/fix-pylint/SKILL.md | Updates skill scope guidance and reorganizes steps; keeps tox command examples. |
Comments suppressed due to low confidence (1)
.github/skills/ml/fix-pylint/SKILL.md:32
- The tox command examples use
--cto specify the config file (e.g.,tox -e pylint --c ../../../eng/tox/tox.ini --root .). Tox uses-c <config>(single dash);--cis not a valid option and will fail if copied/pasted. Please update these examples to use-c.
## Running Pylint
**Command for entire package (tox):**
```powershell
cd sdk/ml/azure-ai-ml
tox -e pylint --c ../../../eng/tox/tox.ini --root .
</details>
sdk/ml/azure-ai-ml/azure/ai/ml/operations/_deployment_template_operations.py
Show resolved
Hide resolved
sdk/ml/azure-ai-ml/azure/ai/ml/operations/_deployment_template_operations.py
Show resolved
Hide resolved
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/_model_base.py
Outdated
Show resolved
Hide resolved
achauhan-scc
approved these changes
Apr 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.
…kill.md file
Resolving issue: #45205
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