Skip to content

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
jayesh-tanna:pylint_45205_v1
Open

Resolving next-pylint 4.0.5 issues for azure-ai-ml sdk and updating s…#46081
jayesh-tanna wants to merge 6 commits intoAzure:mainfrom
jayesh-tanna:pylint_45205_v1

Conversation

@jayesh-tanna
Copy link
Copy Markdown
Member

@jayesh-tanna jayesh-tanna commented Apr 2, 2026

…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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 Y assertions in tests with isinstance(...) to satisfy unidiomatic-typecheck.
  • Downgraded exception logging in DeploymentTemplateOperations from warning/error to debug and simplified try/except blocks.
  • Updated .github/skills/ml/fix-pylint/SKILL.md to 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 --c to specify the config file (e.g., tox -e pylint --c ../../../eng/tox/tox.ini --root .). Tox uses -c <config> (single dash); --c is 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants